Hello,
I am using UART to receive data on a nRF52840 DK.
I have written some code using the Serial Port Library.
I have attached snippets of the code dealing with the Serial Port.
This is the header file
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void init_rs485();
void serial_event_handler(struct nrf_serial_s const * p_serial,
nrf_serial_event_t event);
void send_rs485_message(char *buffer, size_t length);
// Setup UART0 for IPN
#define IPN_BAUDRATE 0x83F8
#define UNUSED_PIN 0xFFFFFFFF
#define RS485_TX_PIN NRF_GPIO_PIN_MAP(0, 6)
#define RS485_RX_PIN NRF_GPIO_PIN_MAP(0, 5)
NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uart1_drv_config,
RS485_RX_PIN, RS485_TX_PIN,
UNUSED_PIN, UNUSED_PIN,
NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
IPN_BAUDRATE,
UART_DEFAULT_CONFIG_IRQ_PRIORITY);
#define SERIAL_FIFO_TX_SIZE 64
#define SERIAL_FIFO_RX_SIZE 64
This is the .C file
I want to see the data being received on the UART RX buffer. How can I see that on the Debug window?
If I add the buffer variable to the watch window, I get 'symbol not found'.
I have verified that I am receiving data on the Serial Bus using Realterm on the PC.
Please help,
Thanks