HI
How stable is the serial_uartesexample in nRF5? I'm running it on a PCA10056, the example works for about 5 seconds and then UART RX stops, i.e. nothing is received after that point.
Thank you.
Pete.
HI
How stable is the serial_uartesexample in nRF5? I'm running it on a PCA10056, the example works for about 5 seconds and then UART RX stops, i.e. nothing is received after that point.
Thank you.
Pete.
Also, some more info. Long story short this came about from me adding serial_uartes to the FreeRTOS blinky and running into these issues there. I have a GPS unit on 9600 baud connected to the problem UART. So I changed over to the standard serial_uartes example, changed the baud rate and pins to what I am using (and on the same hardware) and see the same issue.
So this is basically what I changed in the serial_uartes example:
#define U2RX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,14) #define U2TX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,16) #define URX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,11) #define UTX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,13) NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config, URX_PIN_NUMBER, UTX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED, NRF_UART_BAUDRATE_9600, UART_DEFAULT_CONFIG_IRQ_PRIORITY); NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte1_drv_config, U2RX_PIN_NUMBER, U2TX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED, NRF_UART_BAUDRATE_115200, UART_DEFAULT_CONFIG_IRQ_PRIORITY);
Also interestingly nrf_serial_write(&serial0_uarte, &c, sizeof(c), NULL, 0); seems to only work if single characters are received, i.e. when changing to something like this it never receives anything:
char buffer[32]; size_t count_read; nrf_serial_write(&serial0_uarte, buffer, sizeof(buffer), &count_read, 0);
So I have 2 issues:
1. After receiving a number of characters from the GPS (and echoing these on the TX of the same UART to a PC) receive stops completely and nothing more is received.
2. nrf_serial_write can only receive one character at a time, anything more and it doesn't work at all.
Thank you...
Also, some more info. Long story short this came about from me adding serial_uartes to the FreeRTOS blinky and running into these issues there. I have a GPS unit on 9600 baud connected to the problem UART. So I changed over to the standard serial_uartes example, changed the baud rate and pins to what I am using (and on the same hardware) and see the same issue.
So this is basically what I changed in the serial_uartes example:
#define U2RX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,14) #define U2TX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,16) #define URX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,11) #define UTX_PIN_NUMBER NRF_GPIO_PIN_MAP(0,13) NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config, URX_PIN_NUMBER, UTX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED, NRF_UART_BAUDRATE_9600, UART_DEFAULT_CONFIG_IRQ_PRIORITY); NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte1_drv_config, U2RX_PIN_NUMBER, U2TX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED, NRF_UART_BAUDRATE_115200, UART_DEFAULT_CONFIG_IRQ_PRIORITY);
Also interestingly nrf_serial_write(&serial0_uarte, &c, sizeof(c), NULL, 0); seems to only work if single characters are received, i.e. when changing to something like this it never receives anything:
char buffer[32]; size_t count_read; nrf_serial_write(&serial0_uarte, buffer, sizeof(buffer), &count_read, 0);
So I have 2 issues:
1. After receiving a number of characters from the GPS (and echoing these on the TX of the same UART to a PC) receive stops completely and nothing more is received.
2. nrf_serial_write can only receive one character at a time, anything more and it doesn't work at all.
Thank you...