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

nrf52840's P0.21 cannot be used as libuarte's uart RX?

Hello, Nordic & all:

    I have a problem when use P0.21 as the libuarte's uart RX( base on libuarte example/sdk17.0.2) for my custom nrf52840 board, I looked up the reference of nRF52840_PS and found the follow:

P0.08 have no recommend , P0.21 is recommended as QSPI , but my custom board don't use it as my QPSI, that means I can use it as my libuarte's uart RX, am I right?

Unfortunately, I can‘t receive anything from PC via serial port, then I change to default P0.08, It works fine.

Can you help me? what's wrong with my pin configure, or how can I make P0.21 work fine for libuarte's uart RX?

Thanks a lot! 

  • Kenneth:

           Thanks for your reply,

           Yes, I understand what you mean : the nrf52840DK can not use P0.21 as uart RX unless change its hardware;

           However, I use my custom board, and It's P0.21 wasn't used for any external hardware, when I use it for libuarte, It didn't work either.

  • I am not sure what the problem is here, you would need to try and fail a bit.

    For instance finding out if it's only P0.21 that is problematic may be a good point to start. It could for instance be that the example you are using have also enabled P0.21 to be used by another peripheral, so you may need to find if there are other drivers or libraries in your project that have (by default or accident) use the same pin P0.21.

    It could also be interesting to see if P0.21 can be used as TX, this could give some indication on whether it may be something driving the pin externally that prevent it to work as intended as RX (e.g. soldering).

    You can also try to add a pull-up on the P0.21 just to see if that make a difference, since a floating P0.21 can be interpreted as framing error, making the code to assert. 

    Overall, try and fail a bit, you will eventually find out why it does not work. Maybe you have done other changes to the example project that somehow prevent the application to work as intended, so going back to the default example project as-is from the nRF5 SDK, and only change the RX pin may be something to try.

    Kenneth

Related