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

Uart write on Debug Terminal instead of the pin in the uart_init

Hello everyone, I have a problem I am trying to merge to project using I2c and Uart, So I copy the code from the uart example in the sdk. 

I can read on the debug terminal my printf but not on the Tx pin and I Don't know why, I have comment I2c. I only have the uart part and It's not working.

THank you ! have a good day ! 

Parents
  • Hello,

    I can read on the debug terminal my printf but not on the Tx pin and I Don't know why

    The UART example uses the RTT backend for the NRF LOGGER module, not the UART. This is because the nRF52832 SoC only has 1 UART instance, and it is in use by the application.
    Please check your sdk_config file, where you will see that the *_UART_BACKEND_ENABLED is 0, while the *_RTT_BACKEND_ENABLED is 1.
    printf ends up on the RTT because RETARGET is enabled in the sdk_config. An alternative to the debug terminal is installing the J-Link RTT Viewer desktop application, but either alternative is fine to use.

    To merge the TWI and UART peripheral examples ( non-BLE ) I would suggest that you begin with the UART example, and then add the TWI functionality to it.
    You will need to add the correct TWI configuration, as well as the correct TWI sdk_config defines.
    You will also have to make sure that there is no conflict with shared resources when merging examples.

    THank you ! have a good day ! 

    Thank you, and likewise!
    Please do not hesitate to let me know if anything should still be unclear.

    Best regards,
    Karl

  • Hello, Thank you it's working perfectly you're the best ! have a nice day ! 

    Best regards,

    Arnaud

  • Hello Arnaud,

    campestring said:
    Thank you it's working perfectly you're the best ! have a nice day !

    I am glad to hear that it resolved the issue, and thank you!

    Please do not hesitate to open a new ticket if you should encounter any questions or issues in the future.

    I hope you have a great day, and good luck with your development!

    Best regards,
    Karl

Reply Children
No Data
Related