2020-05-31 01:31 AM
Hello guys good day. I am trying to learn how to interface 2 STM32F103C8 MCUs using UART. Basically I would like to connect a push button to MCU-A then when this push button is pressed, the LED controlled by MCU-B will be activated. I am trying to search for some examples online but I could not find one. Can you give me some hints on how to do this? Thank you.
2020-05-31 01:53 AM
> I am trying to learn
Great.
Read the first 10 chapters in RM plus the USART chapter, read the datasheet and the errata. (USART=UART, i'll use the latter below)
Then, write blinky, ie. software which
Then modify blinky so that it stops blinking when you press a button, i.e.
Then write software which configures UART and transmits some byte repeatedly, i.e.
Then write software which - on the second mcu, or on the same mcu in an other UART - receives data, i.e
Or, you can click in CubeMX. or have a look at https://github.com/STMicroelectronics/STM32CubeF1/tree/master/Projects/STM32F103RB-Nucleo/Examples/UART/UART_TwoBoards_ComPolling (which is probably not CubeMX-generated). I don't use Cube.
JW
2020-05-31 02:43 AM
As always thank you Sir for your help :)