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

nRF52840 UART Transition Issues

We are having issues with UART communication on the nRF52840. Using a logic analyzer, we have found that the transitions happen too quickly. This causes the receiving MCU to read incorrect bits most of the time depending on where the transition lands. Is there a work around for this? Thanks.

Parents Reply
  • OK, so we were finally able to select the XTAL as the clock source and everything works great.  The following code was added to the config file to accomplish this.

    #ifndef NRF_CLOCK_ENABLED

    #define NRF_CLOCK_ENABLED 1

    #endif

     

    #ifndef NRFX_CLOCK_CONFIG_IRQ_PRIORITY

    #define NRFX_CLOCK_CONFIG_IRQ_PRIORITY 6

    #endif

     

    #ifndef NRFX_CLOCK_CONFIG_LF_SRC

    #define NRFX_CLOCK_CONFIG_LF_SRC 1

    #endif

     

     The following code was added to the main file:

     

        nrf_drv_clock_init();

     

        nrf_drv_clock_hfclk_request(NULL);

     

     

Children
Related