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

nrf52832: ERRORSRC 0xC with UARTE0 when starting RX.

Hello everyone,

I am trying to implement UARTE on a custom board embedding an nRF52832, as part of an upgrade from SDK 12 to SDK 15. The nRF52832 is communicating via UART with a GSM chip, sending it messages and receiving some, with different lengths. I am using FreeRTOS.

In order to do that, I checked the example "experimental_libuarte" that is present in the SDK 15.2 file (nRF5_SDK_15.2.0_9412b96/examples/peripheral/experimental_libuarte).

But after implementing it in my project, I always have the same error: as soon as the STARTRX flag is raised, when calling "nrf_libuarte_async_enable(1)", the EVENTS_ERROR register pass to 1, and the ERRORSRC register shows 0xC, so framing and break errors. This happens before anything is send or retrieved. 

I then tried to run only the example program, so without SoftDevice and FreeRTOS, and I have the same error.

After configuration and initialization of UARTE0, everything seems to be fine with UARTE0 register.

r

But as soon as the enabling is done by calling "nrf_libuarte_async_enable(1)", the error appears.

The error is more precisely thrown as soon as the STARTRX flag is raised, inside the "nrf_libuarte_async_enable()" function.

At first I thought that it might be a hardware error, that could for example put the RX line to 0V, interpreted as sending an infinite amount of "0", but it is not : the program worked well when using UART FIFO before, and the RX line is driven high by the nRF52832.

I am adding the main file here, that I slightly modified to match my pins settings and to initialize external clock and gsm chip :

Thank you for your help !

Parents
  • Hi,

    Could you try updating libuarte to SDK 15.3.0? There is some changes in the latest version. Have you checked the RX pin with a logic analyzer, to make sure there is no noise on the line? This is the typical reason for this issue to appear.

    Best regards,
    Jørgen

  • I also have another issue when using libuarte library from SDK 15.3 with SoftDevice (and FreeRTOS).

    When calling nrf_libuarte_async_init(), after entering nrfx_clock_lfclk_start(), I have a SOFTDEVICE: INVALID MEMORY ACCESS. INFO 0x1 error when calling nrf_clock_event_clear(NRF_CLOCK_EVENT_LFCLKSTARTED) inside nrfx_clock_lfclk_start(). I do not have this error without SoftDevice, which seems logic as memory areas not accessible with SoftDevice become accessible without it. Problem is I can't see any pointers pointing to an unaccessible area...

    Is it no longer possible to use libuarte with SoftDevice, are is there some ajustments to do implement ?

    EDIT: Ok, this issue has been solved by disabling RTC and using Timers instead when initializating and enabling uarte with libuarte.

Reply
  • I also have another issue when using libuarte library from SDK 15.3 with SoftDevice (and FreeRTOS).

    When calling nrf_libuarte_async_init(), after entering nrfx_clock_lfclk_start(), I have a SOFTDEVICE: INVALID MEMORY ACCESS. INFO 0x1 error when calling nrf_clock_event_clear(NRF_CLOCK_EVENT_LFCLKSTARTED) inside nrfx_clock_lfclk_start(). I do not have this error without SoftDevice, which seems logic as memory areas not accessible with SoftDevice become accessible without it. Problem is I can't see any pointers pointing to an unaccessible area...

    Is it no longer possible to use libuarte with SoftDevice, are is there some ajustments to do implement ?

    EDIT: Ok, this issue has been solved by disabling RTC and using Timers instead when initializating and enabling uarte with libuarte.

Children
No Data