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

Problem with adding uart to print

Hello, I am using sdk12.2.2 and pca10040. I want to add uart drivers in ble_app_template code so that I can use printf to get my data on terminal. Unfortunately I am not getting anything on uart. I added app_fifo.c and app_uart_fifo .c and I have also added paths. My sdk config file is sdk_config1.txt

and my main file is main2.txt

Thanks,

Parents
  • Hi Newbie!

    I'm sorry for the delayed response.
    I made some modifications to the the ble_app_template in SDK 12.2, to show you how I have done it. I will also add my sdk_config file. In the config file, make sure the following is added and enabled;
    Drivers: UART_ENABLED. Libraries: APP_FIFO_ENABLED, APP_UART_ENABLED and RETARGET_ENABLED.
    Make sure that you have the app_uart_fifo.c, app_fifo.c and retarget.c files added under nRF_Libraries in your project.

    I hope that helps, and make sure to let me know if you have any questions.

    main.c
    sdk_config.h

    Best regards,
    Joakim

Reply
  • Hi Newbie!

    I'm sorry for the delayed response.
    I made some modifications to the the ble_app_template in SDK 12.2, to show you how I have done it. I will also add my sdk_config file. In the config file, make sure the following is added and enabled;
    Drivers: UART_ENABLED. Libraries: APP_FIFO_ENABLED, APP_UART_ENABLED and RETARGET_ENABLED.
    Make sure that you have the app_uart_fifo.c, app_fifo.c and retarget.c files added under nRF_Libraries in your project.

    I hope that helps, and make sure to let me know if you have any questions.

    main.c
    sdk_config.h

    Best regards,
    Joakim

Children
Related