I use the "Nucleo idb04a1 bluetooth low energy" extention. I downloaded the CubeMX from ST website. I ran the example project and it works fine.
Now I want to transmit through UART the value of ADC pin of the board STM32 f401RE and read the value of my weight and flex sensors for my project and see the result on my smartphone.
Which libraries, functions and pins I need to use for my project ?
I use CubeMX to configure pins of my board.
Great regards
Related
I have an analog to digital converter (ADC) MCP3008 connected to Raspberry PI 4 via SPI interface.
I need to process the signal from ADC in ODAS library (Open embeddeD Audition System).
ODAS is capable to process signal from a device in real time, but requires the device to be a soundcard.
Therefore I need to make Raspbian recognize SPI input from ADC as a soundcard.
After googling I found out that I need to write a device tree overlay to describe the soundcard.
I read about device tree overlays and viewed the device tree specification, but still can't figure out, which nodes and properties should I describe in the overlay?
I just designed my first STM32 PCB board for STM32L476RG flashed it and tried to test it with togglePin. However multimeter doesn't show anything.
Here is the design for the STM32
I use nucleo board as a programator by unplagging jumpers and connecting jumper cables to debugger on the PCB board (so that computer can see the stm board)
I use LDO 5V to 3.3V for a power supply to stm32
Here is my settings for stm32 debug:
Although I designed a PCB for JTAG, for flashing microcontroller I use SWD just with JTMS and JTCK
-Here is my clock configuration (i am not using any additional crystal):
I assigned gpio pins as Output in CubeMX but non of them are not going HIGH.
Any thoughts on that? Or what can I possibly do?
I'm using the STM32F401RE Nucleo board, I have noticed that the internal clock HSI has a quite high inaccuracy over temperature and it's not suitable for my application.
I want to use an external clock for the board but I don't know how to properly install and configure the external clock?
And in STM32Cubemx, when selecting SMT32F401RE Nucleo board, in "Clock Configuration" tab, it's not possible for choosing the HSE clock, only HSI clock available.
Any example on how to use external clock source would be great for me.
Thanks
You need to enable the HSE clock in the RCC peripheral in the Pinout tab in STM32CubeMX (Select crystal/Ceramic resonator).
According to the user manual, the crystal is not provided though:
HSE oscillator on-board from X3 crystal (not provided): for typical frequencies and
its capacitors and resistors, refer to STM32 microcontroller datasheet. Refer to the
AN2867 Application note for oscillator design guide for STM32 microcontrollers.The X3
crystal has the following characteristics: 8 MHz, 16 pF, 20 ppm, and DIP footprint. It is
recommended to use 9SL8000016AFXHF0 manufactured by Hong Kong X'tals
Limited.
You can of course use a different oscillator than the one recommended.
If you also want an accurate 32K for date and time, you need to enable the RTC peripheral in the pinout tab.
I am trying to connect an analogue to digital converter to the raspberry pi. As far as I am able to understand, the RPi doesn't support Bi-directional SPI mode. The adc I am using says it is SPI compatible but only has the inputs SCLK, CNV and outputs CLKOUT+ and CLKOUT- and SD0+ and SD0-. This leads me to understand that it will only work with bi-directional SPI as there is only the serial data out. I am thinking of using a PWM for CNV (which I think CE), GPIO clock for SCLK and then an interrupt on the falling edge of the GPIO clock to just digitally read each bit from the adc. I don't understand SPI in detail but from what I've read quite often it requires sending data in order to receive it. Do you know if the setup I mentioned (without using SPI) will work? Or am I missing something about SPI and the adc will work with that while not in bi-directional mode?
We are using the Raspberry Pi 3 b
adc - http://cds.linear.com/docs/en/datasheet/232316fa.pdf
Thanks for any help you can provide.
Read the data sheet carefully, in particular pages 8 and 9. I suggest that you tie CMOS/LVDS pin to ground to enable CMOS mode. Then use only the "+"-pins. Use the SCK for SPI clock, SD01+ for SPI data input to the Rpi. Connect a GPIO pin to CNV.
Also observe that the RPi runs at 3.3V, and the ADC's max rating is also 3v3, that is running the IC right to the edge.
I hope you can help me. I am trying to build a robot but I am kind of stuck. The Arduino Mega is controlling the stepper motors drivers of the robot. The odroid-x is a single board computer that has installed linaro ubuntu and eclipse c++. All the programming is done in C++ and OpenCV is an image processing library.
The odroid-x has only as input a color camera. Therefore, the information from the camera is received and is processed in eclipse. Then, according to the information that is received, the odroid-x should send different integers to the arduino. The arduino should have a program already uploaded in itself, so it will be waiting for an integer and that integer is going to determine what the arduino is going to send to the drivers.
My questions are the following:
How can I do a serial communication between the arduino and the odroid-x?
How can I send information from eclipse to the arduino with a serial connection?
Thanks so much for any guide you can give me
First, be very, very, very careful. The ODROID boards use 1.8V signalling, so hooking up your 3.3V or 5V Arduino to the pins that expect no more than 1.8V will give you a burnt ODROID-X. It is possible to hook these two boards together if you put a level converter between them, and Sparkfun and Adafruit have some of those converters available. There is even a 1.8V reference voltage pin available... one of the pins that go to the LCD panel RGB-to-LVDS converter board puts out a constant 1.8V.
You could use either the four pins of the little white connector, or UART1, as a serial port, or you can use some of the pins in the 50-pin GPIO block as UART4. There are board schematics available on Hardkernel's website. These two UARTs show up as /dev/ttySAC0 (UART1) and /dev/ttySAC3 (UART4).
I don't know how to talk to those UARTs from a program, personally, but I know there are serial communications libraries available for python from watching threads pop up on the ODROID forums.