UARTE not working when specific pins are used

Hi,

I'm observing a strange behavior with the UARTE peripherals on our nrf52840 based board when I'm trying to use a specific pin as TX.

In particular, I'm actually using the UARTE instance 1 with the CLI library without any problems and I want to use the UARTE instance 0 to talk with another MCU.

When we designed the board we chose to put the TX line from the nrf52840 on the P1.11 simply by picking one of the available pins on the chip.

With this configuration, we are not able to send any data to the other MCU, even attaching the oscilloscope to the TX line we can't see any activity on the TX line.

We tried to implement the UART communication using the "APP_UART" driver and the "LIBUARTE" but in both cases, the results are the same. The fun fact is that if we change the TX pin to another which is simply connected to a pad on the board (e.g. P1.12) we see activity with the oscilloscope. Even worse, if we change the TX pin used with the CLI library to P1.11, we can see the right data on the TX line!

We also tried to swap the UARTE instances used by the CLI and the MCU communication but still, the TX line is not working when we use the P1.11 pin.

Any suggestions?

P.S: We are actually using the nrf5 SDK for Thread and Zigbee v4.0.0.

Parents
  • Hi,

    I don't see any reason for why it should not work on P1.11. Can you verify that P1.11 is set as an output in NRF_P1->PIN_CNF[11] and that NRF_UARTEx->PSEL.TXD is configured with the same pin number?

    You can use its built-in peripheral viewer to validate the register settings if you are using an IDE, or you can read the registers directly with nrfjprog:

    $ nrfjprog --memrd 0x4000250c // Read PSEL.TXD

    $ nrfjprog --memrd 0x50000A2C //Read PIN_CNF[11]

    Best regards,

    Vidar

  • Hi,

    Thanks for the reply, we've found out that the RX and TX pins on the other MCU were flipped. The communication is now working as expected even using the P1.11 pin, however, we still don't understand why there was this different behavior with the different pins.

    We've also checked the correctness of the PIN configuration using the procedure that you suggested but we didn't find any difference.

    In any case, the issue is now resolved so you can close this discussion if you want.

    Thanks,

    Paolo

Reply
  • Hi,

    Thanks for the reply, we've found out that the RX and TX pins on the other MCU were flipped. The communication is now working as expected even using the P1.11 pin, however, we still don't understand why there was this different behavior with the different pins.

    We've also checked the correctness of the PIN configuration using the procedure that you suggested but we didn't find any difference.

    In any case, the issue is now resolved so you can close this discussion if you want.

    Thanks,

    Paolo

Children
Related