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.
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
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?
I am using uart_pca10040. I do not see where pins 22 and 23 are being used. Can you be more specific?
That sounds strange. I tried using pins 22/23 and I don't have any problems.
Are you using the ble_peripheral/ble_app_uart or the peripheral/uart example? And which SDK version?
I changed to IAR and works fine. So I am good. Thanks for the support from everyone.
I changed to IAR and works fine. So I am good. Thanks for the support from everyone.
I'm glad you were able to "solve" the issue.
Could you tell me which IDE you were using when you got the error?
Cheers.
I was using Keil.
Thank you.
It worked fine when I tested it using SES. I'll do some tests using Keil and see what I can find out.
Cheers.
Hi, I'm having exactly the same issue. Running the examples/peripheral/uart example it works fine with pins 6 and 8 from port 0 in PCA10056 board. But when I change the pin to a free pin there is no communication. I'm using SES. Should I try another IDE? Am I missing any other change in the code, apart from the definition of RX_PIN_NUMBER and TX_PIN_NUMBER in pca10056.h?
Thanks in advance!
Hi martabc_96,
Maybe you could post a new question about this?
Please explain in detail your setup etc.
Thanks,
Joakim.