This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART between NRF52 dev board and STM32F429ZI6 Discovery

Hello,

I am trying to make a basic uart communication between my nordic NRF52 dev board (PCA10040, s132) and my STM32f429ZIT6 discovery board.

NRF52 : I used the example from sdk 11.0.0 for the fifo uart STM32 : I used the example from STM32Cube_FW_F4_V1.13.0 for the UART_TwoBoards_commIT (basically uart on interruption)

I changed the uart parameters on both side to match:

  • baudrate 9600
  • no parity
  • no HW flow control

First the STM32 wait for the button to be pushed, then it send a character and wait for the NRF52 to send it back. The NRF52 start by waiting for a character from the STM32 and when it receive it, it send it back.

On the nordic the leds are turned on if the received character is the good one. On the STM32 side, LED3 is blinking while in reception mode and LED4 is blinking when receive is complete.

So far it seems that the transmition from the stm to the NRF52 works fine but for the other way, the interruption is not tringerred on the STM32 side.

I tried the loopback test on the nordic and it worked.

The app_uart_put function on the NRF52 return NRF_SUCCESS.

I thought maybe there was a mistake in the example code for the stm32 and the interruption was disabled but I managed to trigger the interruption by plugging the RX pin to GND.

Thank you very much for your help.

Parents
  • Hi HungBui,

    the tx and rx use the same interruption handler so I don't think it can do a loopback, no ? I mean is it possible that the transmission interupt is interupt by the same interupt routine but for the reception ? The exemple for the STM is made for two boards. I test the STM uart connection only with my computer through usb and it worked perfectly fine so that lead me to think that the problem is on the pin configuration. I don't have an analyzer yet (I will order one) but I tried to set the nRF52 tx pin to low after the communication to see with a voltmetre if it's what happen but the state is high. It seems that the rx pin on the STM side force its state to high and the nRF is not able to change it... I don't know if what I am saying is clear

Reply
  • Hi HungBui,

    the tx and rx use the same interruption handler so I don't think it can do a loopback, no ? I mean is it possible that the transmission interupt is interupt by the same interupt routine but for the reception ? The exemple for the STM is made for two boards. I test the STM uart connection only with my computer through usb and it worked perfectly fine so that lead me to think that the problem is on the pin configuration. I don't have an analyzer yet (I will order one) but I tried to set the nRF52 tx pin to low after the communication to see with a voltmetre if it's what happen but the state is high. It seems that the rx pin on the STM side force its state to high and the nRF is not able to change it... I don't know if what I am saying is clear

Children
No Data
Related