Keil Logo

ARM: Flash Programming Algorithm for Virtual Addresses Causes Timeout


Information in this knowledgebase article applies to:

  • Keil MDK

SYMPTOM

I have written a Flash Programming Algorithm for a serial flash. As this flash is not memory mapped, the ProgramPage and EraseSector functions "listen" at a virtual address range, from where they take over the data and write/erase related addresses in the flash. However, when trying to use the algorithm, µVision reports a Flash Timeout, causing the Flash Download in general to fail. Why?

CAUSE

The Flash Programming Algorithms normally work on memory mapped flash. Because of that, BlankCheck and Verify functions can have generic implementations. The manual marks that functions also as "optional". µVision has build-in implementations of them, that basically just read from the memory.

The Flash Timeout happens most likely, when the build-in version of BlankCheck or Verify starts reading form the virtual addresses. Depending on the actual addresses, the device can enter a fault exception, if this is "invalid memory" for it. The algorithm function will so never reach the expected end, causing the timeout.

RESOLUTION

Implement also the "optional" algorithm functions BlankCheck and Verify. They should also map the virtual addresses to the offsets in the serial flash to work properly.

MORE INFORMATION

Last Reviewed: Monday, November 2, 2020


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.