[RSL10 - Knowledge Base]
When using the RSL10 Flash Library to lock/unlock and read/write to a Flash memory sector, you may occasionally experience an error status as the function return, even when the steps outlined in the Hardware Reference are followed properly. These errors indicate that the Flash operation was not successfully executed.
What can cause this improper behavior when performing Flash operations, even when following the appropriate steps to complete the action?
When you are performing operations within the RSL10’s Flash sectors, you are required to set the appropriate Flash Delay timing that corresponds with the System Clock that is being used to execute the program. If the Flash Delay settings are configured to be lower than the System Clock, the Flash operation can fail and produce the error status being seen. Due to the default Flash Delay being set to support a System Clock whose value is less than or equal to 5MHz, using the RF 48MHz Crystal to source the System Clock can often result in these errors occurring if the Flash Delay is not adjusted properly.
To change these Flash Delay timings, you must write the appropriate bit values to the
FLASH_DELAY_CTRL hardware register. The image below from the RSL10 Hardware Reference outlines the bit values that correspond to each available Flash Delay timing.