Dear nordic,
I implemented a uart in BLE application its works fine.
I need to reduce current for that i enable and disable uart but when i call function disabled or enabled function the uart stops working. can you help me to solve this ?
Uart init function:-
void uart_init(void)
{
uint32_t err_code;
app_uart_comm_params_t const comm_params =
{
.rx_pin_no = RX_PIN_NO,
.tx_pin_no = TX_PIN_NO,
.rts_pin_no = RTS_PIN_NO,
.cts_pin_no = CTS_PIN_NO,
.flow_control = APP_UART_FLOW_CONTROL_DISABLED,
.use_parity = false,
#if defined (UART_PRESENT)
.baud_rate = NRF_UART_BAUDRATE_57600
#else
.baud_rate = NRF_UART_BAUDRATE_57600
#endif
};
APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_event_handle,
APP_IRQ_PRIORITY_LOWEST,
err_code);
APP_ERROR_CHECK(err_code);
}
Uart enable and disable:-
oid Disable_Uart(void)
{
NRF_UARTE0->TASKS_STOPTX = 1;
NRF_UARTE0->TASKS_STOPRX = 1;
NRF_UARTE0->ENABLE = 0;
}
void Enable_Uart(void)
{
NRF_UARTE0->ENABLE = 1;
NRF_UART0->TASKS_STARTTX = 1;
NRF_UART0->TASKS_STARTRX = 1;
}
I need a help to solve this why my uart stops when i call enable or disable function?