Using the UART example of the 52DK with the TX and RX pins set as 8 and 6 the example works. If I try to change the pins to different pins such as 22 and 23, it does not work by giving an UART Comm Error. Problem is reported from the UART ISR.
Using the UART example of the 52DK with the TX and RX pins set as 8 and 6 the example works. If I try to change the pins to different pins such as 22 and 23, it does not work by giving an UART Comm Error. Problem is reported from the UART ISR.
TK Here Which version of the 52DK are you using? Is it the nRF52832(PCA10040) or the nRF52840 (PCA10056)? Have you checked to see if those pins are available on the DK by reviewing DK hardware files?
Why do you change the TX/RX pin? Do you connect it to something else?
If you connect it to something else, do you also connect the other device to ground?
If you just change the pin number, but don't connect anything to it, it will be left floating in the wind and will pick up noise. The UART will then believe that the noise is actual data, but not be able to make sense of it. Then it generates a Communication error.
Best regards,
Joakim
PCA10040 1.2.1 2017.45
Yes, pins should be free
Connects perfectly with cable to terminal emulator with pins 8 and 6. Changing RX_PIN_NUMBER and TX_PIN_NUMBER and moving the wiring, it does not work.
Which example are you using? If you look at the board support file, pca10040.h, you will see that pins 22 and 23 are defined for different peripherals. Is it possible that the example you are using is redefining those pins when another peripheral gets enabled?