Hi
I use NRF51822_XXAC + s130_nrf51_2.0.0_softdevice + nRF5_SDK_12.3.0_d7731ad, IDE is segger embedded studio 3.40, my program works well when i set optimize level to DEBUG level, but when i set optimize level to optimize for size, function nrf_dfu_flash_erase never return, the program is blocked and only interrupts can work. Then i set optimize level of nrf_dfu_flash.c file to Debug(all other files in the project is also optimize for size), the program works again.
I want to know that if nordic's SDK code is not rigorous, and using higher-level optimizations can lead to problems, or maybe I'm using it incorrectly?