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
  • Hi,

    Could you explain a bit more why you believe it is “hanging in power cycle” ?

    What is happening when it is “hanging in power cycle” ?

    What example in the SDK is this? Is it ble_peripheral/ble_app_uart? Or peripheral/uart example?

  • Hi,

    Thanks for the response. I am using nordic SDK 15 and am using the uart example code found in peripheral/uart directory. The driver version is pca10040. When I am building the code in debug configuration and flashing in to the board, I am able to see echo working in teraterm application. But if I remove the USB power from the board and connect it again to my PC, I am not able to perform echo operations in teraterm application. For the uart operation to work I need to flash the hex file again to the board.

    But this issue is not coming when I am flashing the hex file generated from release configuration. 

  • I have not been able to reproduce this. Have you done any modifications to the project that might have caused this?

  • 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.

Reply
  • 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.

Children
No Data
Related