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

Hang in power cycle due to UART

Hi,

This is Srivisakh. I am using a custom made board integrated with nrf52832 board in which UART is configured. I am using Segger IDE for code development and building. When I am building the code in debug configuration with UART integrated and flashing the hex file into the board, it is getting hang in power cycle. This issue I am not facing when I am building the code in release configuration. Is this an issue with the nordic SDK or with the hardware. Can you please give points to resolve this issue.

One more pointer to note is that when the UART is enabled with the same SDK to nrf52840, and when compiled in debug configuration, the hang in power cycle is not observed.

Parents Reply Children
  • Hi,
    One update. When I did the below change, I am not getting this issue.

    "nrf_gpio_cfg_input(RX_PIN_NUMBER, NRF_GPIO_PIN_PULLUP);"

    The above resolution I found it in Nordic forum only to resolve for APP_UART_COMMUNICATION_ERROR.

    But I don't know what is the effect the pull up of RX_PIN will resolve this power cycle issue.

    Can you give more insights in to this one.

  • Hi,

    I assume that you are not seeing this issue on the nRF52832-DK, but only on the custom board.

    One theory about what is happening, is that you are getting some kind of error on the UART peripheral. It could maybe be caused by noise, bad soldering, long traces, etc. Pulling the RX high somehow solves this issue. When this issue happens, the application will then get a APP_UART_COMMUNICATION_ERROR, and the error-code will be passed into the error-handler. In the release configuration the nRF5 will just reset in app_error_fault_handler() where NVIC_SystemReset() is called, but in the debug configuration you will hit a breakpoint in the APP_ERROR_HANDLER(), and it will look like the power is “hanging”. If you run a debug-session in Segger Embedded Studio, you should be able to verify this.

Related