Problem by running echo_bot sample

Hi everybody

I'm using nRF Connect SDK 2.6.1. I have my own board based on nRF52840 SoC.
I made an overlay file of nRF52840DK and changed its UART TX/RX settings according to my board.
I tested echo_bot sample (without any changes) from "zephyr\samples\drivers\uart\echo_bot". When I send a string to the UART terminal, the SoC will be reset suddenly without doing echo back.
I tested it by debug and saw everything is OK and the SoC does echo back the string.
So, I guessed this problem can be occurred by optimization configs.
Therefore I checked all available optimization configs and found the below results:

CONFIG_SIZE_OPTIMIZATIONS=y       >>   The SoC resets and wait again for UART receive.
CONFIG_SPEED_OPTIMIZATIONS=y   >>   The SoC resets repeatedly. It resets periodically after printing "Tell me something and press enter:\r\n".
CONFIG_DEBUG_OPTIMIZATIONS=y   >>   Result is OK.
CONFIG_NO_OPTIMIZATIONS=y          >>   Result is OK.

I'll be happy to guide me.

Thanks in advance
Mehdi Sadeghian

Parents

  • CONFIG_SIZE_OPTIMIZATIONS
    This setting can reduce the size of your code by removing unused sections, but sometimes it can also lead to issues with certain hardware interactions or peripherals like UART, especially when interrupts or buffers are optimized away.
    Solution: If your SoC resets when CONFIG_SIZE_OPTIMIZATIONS is enabled, it may be causing a critical section to be stripped, which could affect UART handling. You might try disabling CONFIG_SIZE_OPTIMIZATIONS or selectively enabling features that are necessary for your board's UART functionality.URL Shortener Free
    .

Reply

  • CONFIG_SIZE_OPTIMIZATIONS
    This setting can reduce the size of your code by removing unused sections, but sometimes it can also lead to issues with certain hardware interactions or peripherals like UART, especially when interrupts or buffers are optimized away.
    Solution: If your SoC resets when CONFIG_SIZE_OPTIMIZATIONS is enabled, it may be causing a critical section to be stripped, which could affect UART handling. You might try disabling CONFIG_SIZE_OPTIMIZATIONS or selectively enabling features that are necessary for your board's UART functionality.URL Shortener Free
    .

Children
No Data
Related