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

Uart interface in sample project ble_app_uart_c does not work on nRF51822

Hello,
when I try to send data via the UART interface using a printf statement, unfortunately this does not really work. Only one byte is sent and after that the application hangs. I have attached a photo with a code snippet of where the program hangs (in the write function at the position app_uart_put).


I hope that someone can help me.

Parents
  • Hi,

    using a printf statement, unfortunately this does not really work.

    1) Could you post the the code you used? where did you call printf? in main() ?

    2) Do you see "Uart_c Scan started" being printed when you run the ble_app_uart_c example?

    3) What SDK version are you using?

    4) What serial terminal are you using?

    5) Custom board or nRF51-DK?

    6) Are you using UART with or without flow-control? Is the terminal configured with the correct flow-control settings?

Reply
  • Hi,

    using a printf statement, unfortunately this does not really work.

    1) Could you post the the code you used? where did you call printf? in main() ?

    2) Do you see "Uart_c Scan started" being printed when you run the ble_app_uart_c example?

    3) What SDK version are you using?

    4) What serial terminal are you using?

    5) Custom board or nRF51-DK?

    6) Are you using UART with or without flow-control? Is the terminal configured with the correct flow-control settings?

Children
  • Hi, thank you very much for your answer.

    I have compressed the complete Eclipse project and attached it here. You only need to set the paths for the includes.
    To answer your questions:


    2) Uart_c Scan started is executed in the main before the first time the scan is started.
    3) SDK version 12.3.0
    4) Realterm (I checked baudrate and port 100 times)
    5) Yes, a custom board which I flash with the nRF51-DK. But there is nothing wrong with the board, there are other sample projects running (e.g. ble_app_beacon).
    6) Flow control is disabled and in Realterm the settings are also adapted to it.

    I had to do changes in the pca10028.h file, according to my custom board. I can compile and link the project without warnings and errors, but I just can't find the error. I also checked the memory settings, they are correct for my SoC (nRF51822-QFAA).
    6406.ble_app_uart.zip6153.pca10028.h

  • Hi Sigurd,

    i just recreated the project and now it works. I must have chosen the wrong settings before.

    Thanks for your help

Related