When I used "nRF5_SDK_15.0.0_a53641a\examples\ble_central\ble_app_uart_c " , it run ok . But my hareware is used PIN33 for RX, PIN32 for TX. So I changed pca10040.h ,please see the following . And now the software doesn't run. The J-LINK shows " 0> <error> app: Communication error occurred while handling UART. ".
WHY? please help me. thank you. My board is uesd 52832.
#define RX_PIN_NUMBER 19 / /8#define TX_PIN_NUMBER 18 //6
I can see that you have another post almost identical to this one, that one of my colleagues has reponded to. I'll copy their answer to this thread as well.As you didn't repond to my colleagues answer, might we assume that the issue has been resolved?
"Why do you change the 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.
Thanks for this post. In the pca10040.h, i see that :
#define RX_PIN_NUMBER 8
#define TX_PIN_NUMBER 6
#define CTS_PIN_NUMBER 7
#define RTS_PIN_NUMBER 5
Does it means by default your chips nrf52832 are configured this way, is it what you recommand to use as a pinout of the nrf52832?
Those definitions is, as you can see, in the pca10040.h header. PCA10040 is, as you might know, the nRF52-DK.
On the nRF52-DK the UART pins are internally connected to the on-board Segger debugger chip, and it will be available on your PC as a normal COM port. If you are using the nRF52-DK and want to make use of this, then I would recommend this pinout.
However, any of the GPIO's can be used as long as they aren't used by any of the other peripherals.
nRF52 Development Kit User Guide v1.2 - 5.2 Virtual COM port.
Glad to see the information, but what is the solution? according to nrf52832 data sheet, any GPIO can be defined as uart pin and made the board, we need to make it a rule, uart has to be 8,7?
No, the uart doesn't have to be 8/7 (or 8/6 like it's configured in the SDK), so we can't make a rule like that. You can use any GPIO just as you'd like.