Hi,
I'm trying to send out 3 bytes just before I reset the chip. I am using nRF51, SD 130 1.0 and SDK v10.0.0. UART works well in other parts of code.
My original solution was:
app_uart_put(0x01);
app_uart_put(0x02);
app_uart_put(0x03);
app_uart_flush();
NVIC_SystemReset();
but I only see 0x01
sent out. So the reset must be happening too fast. I tried multiple versions of above snippet, trying to send out all bytes before reset, but none works. This one is very hardcore and I really have no explanation why I see only first byte, but not others:
app_uart_put(0x01);
nrf_delay_ms(1);
app_uart_put(0x02);
nrf_delay_ms(1);
app_uart_put(0x03);
nrf_delay_ms(1);
app_uart_flush();
nrf_delay_ms(500);
NVIC_SystemReset();
What is happening here? How can I send out three bytes via UART before reset?