|
|||||||||||
Technical Support Support Resources
Product Information |
µVISION: Hard Fault Error on ECC Memory on SmartFusion2 BoardInformation in this knowledgebase article applies to:
SYMPTOMYou receive a Hard Fault error when starting your application using a SmartFusion2 device with ECC memory enabled. CAUSEThe linker, by default, compresses RW data to reduce the size of the ROM image. The decompressor uses a store-byte (STRB) instruction to initialize ECC memory which performs a read-modify-write operation to store a byte into a 32-bit word on this device. Since the memory is uninitialized, the "read" part of the operation causes the hard fault error. RESOLUTIONIn your µVision project, turn the RW data compressor off by setting the "--datacompressor off" option in Options for Target -> Linker -> Misc Controls. This results in memory being initialized with a store-word instruction (STR), which does not perform a read before writing.
Depending on the application, this may result a larger ROM image. Any attempt to initialize ECC memory with an STRB or STRH instruction will result in a Hard Fault. For example, the memset() function calls lower-level libraries which may use STRB or STRH. If using the memset() or memcpy() function causes a Hard Fault, and you do not want to turn off decompression, you may want to write your own version of that function using code similar to the following: for (i=RAM_DATA_START; i<((uint32_t)&Image$$ER_RW$$Base); i+=4) { ptr = (u4*)i; *ptr = 0x00000000; } MORE INFORMATION
Last Reviewed: Friday, February 12, 2021 | ||||||||||
|
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.