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

UART in nrf52832

Hi I am using  UART code from nRF5_SDK_16.0.0_98a08e2\examples\peripheral.

I have checked loop back with default UART pins,which are 5,6,7,8.

Now I want to interface some sensor (Hardwired ) with this PCA10040 DK. Hence I read on Nordic community that I have to use different GPIOs.

I have changed 5,6,7,8 to 28,29,30,31 and 19,20,22,23 but in both cases loop back did not work.(I did not get data on serial port).

What am I doing wrong ? Please help

Parents
  • Hello,

    I have checked loop back with default UART pins,which are 5,6,7,8.

    By this, do you mean that you successfully built and ran the example - seeing the expected behavior as mentioned in the UART example documentation? I am just making sure I have understood you correctly.

    Now I want to interface some sensor (Hardwired ) with this PCA10040 DK. Hence I read on Nordic community that I have to use different GPIOs.

    I am not sure I understand this correctly. You may use the pins 5, 6, 7, 8. Where did you read that you had to use different GPIOS?
    Also, as a side note for future reference, it is crucial to have a look at the Pin Assignment before changing pins, if you intend to make use of the radio in your application.

    I have changed 5,6,7,8 to 28,29,30,31 and 19,20,22,23 but in both cases loop back did not work.(I did not get data on serial port).

    Was this the only modification you made to the UART example?
    Could you possibly share the code snippet of the modifications you made?

    If you are using the UART peripheral to interface with another device, then you must use RTT for the logging and debugging.
    You can use the Segger RTT as backend for the nrf_log instead of the UART. Set NRF_LOG_BACKEND_RTT_ENABLED to 1 in sdk_config.h, if you are using Segger embedded studio IDE, RTT logs can be shown directly in the IDE. If you are using a different IDE/Toolchain, you can use JLinkRTTViewer.exe. 
    The BLE peripheral Nordic UART example demonstrates how this can be done. 


    Looking forward to hearing from you,

    Best regards,
    Karl 

     

Reply
  • Hello,

    I have checked loop back with default UART pins,which are 5,6,7,8.

    By this, do you mean that you successfully built and ran the example - seeing the expected behavior as mentioned in the UART example documentation? I am just making sure I have understood you correctly.

    Now I want to interface some sensor (Hardwired ) with this PCA10040 DK. Hence I read on Nordic community that I have to use different GPIOs.

    I am not sure I understand this correctly. You may use the pins 5, 6, 7, 8. Where did you read that you had to use different GPIOS?
    Also, as a side note for future reference, it is crucial to have a look at the Pin Assignment before changing pins, if you intend to make use of the radio in your application.

    I have changed 5,6,7,8 to 28,29,30,31 and 19,20,22,23 but in both cases loop back did not work.(I did not get data on serial port).

    Was this the only modification you made to the UART example?
    Could you possibly share the code snippet of the modifications you made?

    If you are using the UART peripheral to interface with another device, then you must use RTT for the logging and debugging.
    You can use the Segger RTT as backend for the nrf_log instead of the UART. Set NRF_LOG_BACKEND_RTT_ENABLED to 1 in sdk_config.h, if you are using Segger embedded studio IDE, RTT logs can be shown directly in the IDE. If you are using a different IDE/Toolchain, you can use JLinkRTTViewer.exe. 
    The BLE peripheral Nordic UART example demonstrates how this can be done. 


    Looking forward to hearing from you,

    Best regards,
    Karl 

     

Children
No Data
Related