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

UART issuses on nRF Connect SDK 1.5.1

Hello Nordic Team,
I am having issues with the peripheral_uart firmware for the nRF52833.
1.I can use UART_init() or nrf_drv_uart_uninit() in nRF52-SDK to enable or disable UART. How can I do that in NCS?
2.I changed the baud rate to 921600bps. An error occurred that caused the system to reset. I found that it is caused by k_free (buf) in ble_write_thread (). How can I solve it?
3.Can I use firmware to configure an external or internal 32.768k crystal oscillator?
Thanks,
Stanley
Parents
  • Hi,

    I found that the GPIO level of my demo board is not 3.3V. It was correct after I changed it to 3.3V.

    I forgot that I was using nRF52833, I am very sorry.

    static void gpio_output_voltage_setup(uint32_t UICR_REGOUT0_VOUT)
    {
    if ((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) !=
    (UICR_REGOUT0_VOUT << UICR_REGOUT0_VOUT_Pos))
    {
    NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen;
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
    NRF_UICR->REGOUT0 = (NRF_UICR->REGOUT0 & ~((uint32_t)UICR_REGOUT0_VOUT_Msk)) |
    (UICR_REGOUT0_VOUT << UICR_REGOUT0_VOUT_Pos);
    
    NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren;
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
    NVIC_SystemReset();
    }
    

    In addition, I found that the settings of the external or internal 32.768k crystal oscillator can be modified in mpsl_lib_init().
    All problems have been resolved.

    Thanks,

    Stanley

Reply
  • Hi,

    I found that the GPIO level of my demo board is not 3.3V. It was correct after I changed it to 3.3V.

    I forgot that I was using nRF52833, I am very sorry.

    static void gpio_output_voltage_setup(uint32_t UICR_REGOUT0_VOUT)
    {
    if ((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) !=
    (UICR_REGOUT0_VOUT << UICR_REGOUT0_VOUT_Pos))
    {
    NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen;
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
    NRF_UICR->REGOUT0 = (NRF_UICR->REGOUT0 & ~((uint32_t)UICR_REGOUT0_VOUT_Msk)) |
    (UICR_REGOUT0_VOUT << UICR_REGOUT0_VOUT_Pos);
    
    NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren;
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
    NVIC_SystemReset();
    }
    

    In addition, I found that the settings of the external or internal 32.768k crystal oscillator can be modified in mpsl_lib_init().
    All problems have been resolved.

    Thanks,

    Stanley

Children
Related