Dear Sir/Madam
We are planning to use P0.17 (RXD ) and P0.19 (TXD) as serial communication port connecting to Microchip SAM L10 Xplained Pro - Dm320204. I wonder if there is any sample code or UART driver available for nRF52832?
Thanks
Victor
Dear Sir/Madam
We are planning to use P0.17 (RXD ) and P0.19 (TXD) as serial communication port connecting to Microchip SAM L10 Xplained Pro - Dm320204. I wonder if there is any sample code or UART driver available for nRF52832?
Thanks
Victor
Hi,
There are multiple UART examples in the SDK, but none of these uses the UART driver directly.
You can chose from the following examples:
If you are planning to send/receiving large amounts of data, I would highly recommend that you use the last example/library.
The pin configuration can be set in the examples.
Best regards,
Jørgen
Hi Jorgen
I compiled & ran the Libuarte Example successfully. Will take your recommendation to use UARTE. Thanks.
Which file(s) contains the pin configuration? Any advice will be appreciated.
Thanks
Victor
I found following code in file pca10040.h
// serialization APPLICATION board - temp. setup for running serialized MEMU tests
#define SER_APP_RX_PIN 23 // UART RX pin number.
#define SER_APP_TX_PIN 24 // UART TX pin number.
#define SER_APP_CTS_PIN 2 // UART Clear To Send pin number.
#define SER_APP_RTS_PIN 25 // UART Request To Send pin number.
However, when I search the entire solution, no where uses it. Is there other place define them?
Thanks
The LIBUARTE example uses the default UART pin configurations from the board header file:
//From main.c nrf_libuarte_async_config_t nrf_libuarte_async_config = { .tx_pin = TX_PIN_NUMBER, .rx_pin = RX_PIN_NUMBER,
//From pca10040.h #define RX_PIN_NUMBER 8 #define TX_PIN_NUMBER 6
You can change the pin configurations directly in main.c, either by passing the GPIO numbers directly, or by defining new symbols.
The SER_APP_* defines are used by the serialization solution examples.
Hi Jorgen
I tried serialization solution examples you mentioned. Connected the two nRF52 development boards as in the instruction of serialization hardware uart. , which is very clear. Serialization software setup installation are easy to follow too. However, after install Heart Rate application on app board and serialized example project onto connectivity board, then I don't know what & where to look the logs or activity. I used RTT to connect to application board, and no RX/TX activities. I assume this example will show user how two boards can communicate each other via UART with PINS connected, right? Further info will be appreciated.
Thanks
Victor