This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART Problem nrf_drv_uart.c

Hello,

I am using an NRF52832 on a Custom Board that i built myself.

I want to communicate with a PC software via UART so i've connected the TX, RX and GND ports to the USB port on PC using a TTL-232R-3V3 cable (an FTDI chip is built in it so that it should normally transform the Uart Signal to USB (Serial)) . 

I've used the app_uart_fifo.c as application layer for uart and the nrf_drv_uart.c as the Driver and it worked with an nRF52832 on a SDK but not on my Custom Board.
I debugged and i have found that my program is stuck in the While Loop (in nrf_drv_uart.c) waiting for the TXDRDY Event to be generated. 

Like i said it works fine with the SDK and the included USB cable but not with my own Configuration and i don't undestand why !
I have tested plenty of different Solutions and configurations such as Debugging the SDK where i found that it goes over UARTE and not UART so i tried this on my custom Board but then it stuck on the While Loop of the ENDTX / TXSTOPPED Event !

Thanks for your Help !!

Parents
  • Have you enabled hardware flow control? Make sure to disable it.

    Have you looked at the serial lines on a logic analyzer to check the actual data and pin levels? Maybe you have swapped TX and RX, how about VDD, does that need to be connected to a level shifter or similar?

    Best regards,
    Kenneth

  • Hello,

    Hardware flow Control is disabled i have never enabled it since i don't use CTS and RTS.

    TX and Rx are also allright TX is connected to Rx and Rx to Tx and VDD i don't think i Need it because my custom Board receives Current from a Batterie connected to it !

    Concerning checking the Data at the pin Level i think it is a good idea, but eather it works or not i don't have any Clue About what causes the Problem !

Reply
  • Hello,

    Hardware flow Control is disabled i have never enabled it since i don't use CTS and RTS.

    TX and Rx are also allright TX is connected to Rx and Rx to Tx and VDD i don't think i Need it because my custom Board receives Current from a Batterie connected to it !

    Concerning checking the Data at the pin Level i think it is a good idea, but eather it works or not i don't have any Clue About what causes the Problem !

Children
Related