This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UARTE lost a byte after uarte disable and enable again.

Hi,all~

void gpio_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
    switch (pin_no)
    {
        case   PIN_NRF_SLEEP:
        {
            if(! nrf_gpio_pin_read(PIN_NRF_SLEEP) )
            {
                drv_uart_enable();
                app_master_led_state_change(LED_ON);
            }else{
                drv_uart_disable();
                app_master_led_state_change(LED_OFF);
            }
        }
        default:
            break;
    }
}

The program runs on nRF52833. At the beginning, MCU sends data to nRF52833 through serial port, and the data can be received correctly(pic one). When I use THE GPIO control module to disable and enable the serial port again, the MCU is sending data, you can see that the UARTE0 register is missing the seventh byte of data(see pic two).The SDK version is NRF5_SDK_17.0.2_D674DDE.

pic one:

pic two:

PC send log:

Related