Hi. I'm using PCA10028, SDK10.0.0, S130.
I want to go to nrf_drv_uart_uninit(); right after sending data. in order to save current consumption.
So I made source code as below.
uart_start_sending=1;
for(int i=0;i<datalen;i++) app_uart_put(ptrData[i]);
......
void uart_event_handle(app_uart_evt_t * p_event) {
......
case APP_UART_TX_EMPTY:
if(uart_start_sending)
{
uart_start_sending=0;
nrf_drv_uart_uninit();
}
break;
......
}
But I can't send last 1 byte. For example, if i send 20 bytes, i can send 19bytes but not 20th byte.
I think, UART goes to disable mode(nrf_drv_uart_uninit) before sending last byte.
How can I send all bytes then go to sleep mode? I need your help.