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

Why official UART application getc() / putc() get wrong baudrate ?

I cloned the demo project inside the Keil MDK5, from the following path:

  • pack installer
  • device = "nRF51822_xxAC"
  • examples = "uart_pca10028, UART_Example_Application"

After cloning the source, I found it is nRF51422-QFAC, but I didn't change it. Since I am developing on a custom board, I changed the macro definitions in Keil by removing BOARD_PCA10028, with replacement of CUSTOM_BOARD, and prepare the custom_board.h in Keil path.

The example code runs without softdevice, so I erased the softdevice, and start to debug. I found getc() / putc() functions are working, since I can find char output from TX, and user input can trigger RX, but no matter how I change the baudrate, the RX/TX seems talking on a wrong baudrate anyway.

Any hints ? Is there anything to do with differences between nRF51822/51422 ? The attachment is my code adapted to custom board.

uart.7z

Related