I ran into a strange problem reported by a customer.
When we debug the step by step Erase Sector function, we noticed that the variable "temp" which receives several data remains "optimized out" and we don't have any access to its content.
Antother thing is that it runs ramdomly through the lines in a strange sequence and skips parts which should be executed.
We got Error "0x20" from the function but the reason for this error explained in KSDK corresponding header file is not helping at all. We still don't know how to fix it.
#define FTFx_ERR_ACCERR 0x0020U
/*! @brief Cannot change protection status
* Possible causes:
* Violates protection transition.
* In NVM normal mode, protection size cannot be decreased. Therefore, the only increasing
* protection size is permitted if the device is operating in this mode.
For a better visualization, we recorded a small video of the code debugging:
Attached it goes his firmware that runs in KDS 3.0 and KSDK 1.3.0 (The MCU is MK22FX512).
Can anybody help us with this please?
Thanks and best regards,
Original Attachment has been moved to: 2_Sensores_V00_00_00.rar