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! 

  • Hi, 

    I don't see any reason why P0.21 can't be used as uart RX, if you are using the nRF52840-DK then the P0.21 is by default routed to external memory IC, so you need to cut and solder some solder bridges as indicated on the back of the nRF52840-DK in that case. However, if you are using your own board, then I don't expect that is the problem. Are you able to toggle the P0.21 pin as a normal GPIO just to check it electrically?

    Kenneth

  • Hi, Kenneth:

    Thanks for your quickly reply!

    Yes, I configured P0.21 as normal output pin to set(or clear ) the electric level, It can work fine. 

  • Sorry, but it doesn't make any sense, do you have a nRF52840-DK you can use for comparison?

    Kenneth

  • Hi, Kenneth:

        I'm very sorry to reply so late because I was focus on another important thing that time;

        According to your suggest, I verify this on nRF52840DK (SDK17.0.2) this via serial tool, and the result is:

    1、the default configure:TX=PIN6, RX=PIN8 , result is OK;

    2、custom configure:TX=PIN6, RX=PIN11, result is OK;

    3、custom configure:TX=PIN6, RX=PIN21, result is FAIL;

    The follow is all my changed place :

    //#define RX_PIN_NUMBER  8
    #define RX_PIN_NUMBER  21
    #define RX_PIN_NUMBER  11
    
    #define TX_PIN_NUMBER  6
    //#define TX_PIN_NUMBER  19
    #define CTS_PIN_NUMBER 7
    #define RTS_PIN_NUMBER 5
    #define HWFC           true
    
    //#define BSP_QSPI_SCK_PIN   19
    #define BSP_QSPI_CSN_PIN   17
    #define BSP_QSPI_IO0_PIN   20
    //#define BSP_QSPI_IO1_PIN   21
    #define BSP_QSPI_IO2_PIN   22
    #define BSP_QSPI_IO3_PIN   23
     

    and the test log is:

    Can you test on your environment and verify? why the pin21 can not used as the liburate RX?

    Thanks very much and look forward to your reply.

  • Hi,

    If you flip the nRF52840-DK over, you can find the P0.21 is by default connected to memory. You need to change some solder bridges as shown on the back side of the nRF52840-DK.

    Kenneth

Related