This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Flash ECC error injection

Other Parts Discussed in Thread: HALCOGEN

Hello,

I believe I have Flash ECC working (checkFlashECC runs and going to the appropriate dabort function and increasing a counter that I added in).

I'm using Auto ECC Generation and have my sys_link.cmd file configured according to http://processors.wiki.ti.com/index.php/Linker_Generated_ECC. I've used halcogen (3.06 because I'm using lwip and after 3.06 requires me to go and fix the lwip set up) to set up the flash and ram ecc. 

I tried the error injection of a multibit error at an address that was a function call, and it doesn't seem to do detect that there's an error, instead it just goes to the wrong address for the program counter.

I also occasionally notice the console tells me that part of the program sits in a location that it can't write too...I'm assuming these to issues are related. "CortexR4: GEL Output: Memory Map Setup for Flash @ Address 0x0CortexR4: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map."

Any advice? 

  • Hi Andrew,

    I guess I'd start with the basics.  Like confirming that ECC is enabled by checking CP15 registers,  and confirming that the ECC error value was actually programmed. (The ECC bits are mapped to be readable - you can find the address in the memory map of the device datasheet, and find the mapping in the TRM).

    Also are you hitting an abort exception or NMI - this is what you should be getting if you've got a double bit error.

     

  • Thanks for the response. I was unaware of the CP15 registers needing to be set as well - I haven't come across it yet. I'll dig into that and see what I find. sys_startup does call coreEnableExportEvents and coreEnableFlashECC generated by HalCoGen, so if you're referring to those registers I think they should be set up correctly, but I can't figure out where to look for them in the register viewer.

    It tries to do an abort exception (specifically undefEntry)  for thing like --ecc:data_error 0x61fd0,0x11. If I'm injecting an error at 0x61fd0 I should see the ECC data change at 0xf040c3f8 on the RM48 correct? the relevent line of code in my sys_link.cmd is: 

    ECC_FLA0 (R)  : origin=(0xf0400000 + (start(FLASH0)  >> 3))  length=(size(FLASH0)  >> 3)           ECC={algorithm=algoR4F021, input_range=FLASH0 }

    I have attached my FlashWrapper and CP15 registers after running an instruction with a bit flip. 

  • Just trying to give this thread a bump. Any new insights?