flash blocks be set some for APP running ,other for datas.at some case ,datas block are Erase 0Xffff; then power down ,and UP. running to IVPR1 Interrupt .how to do this? thanks
Can you give me some examples for how to doIVPR1 .thanks
I found attached project in my repository. It just increments the return address in MCSRR0 in IVOR1, so it can continue in the program flow - which is not always possible depending on the source of problem. For example, you can do that when reading user data from flash which may be corrupted due to ECC.
The example follows this application note:
you know the datas flash is erased ok,then the code also can running .but at some condition, the goto IVPR1.This is not leads ECC errors . so I want to know this condition make MCSR(IF) set ? how can to do this condition ? tanks .
You can check MCSRR0 core register when IVOR1 is triggered. This register contains address of instruction which caused the error. This should provide some hints what happened.
When the flash is erased/programmed in runtime, there’s always a risk that the flash operation will be terminated by unexpected reset or power down. In this case, the flash (only areas directly modified by the erase or program operation, other flash is not affected) is left in undetermined state. In this case, it usually leads to noncorrectable ECC errors. When you access such corrupted flash later, the access is terminated by bus error and IVOR1 exception is triggered if it was core access.
The exception needs to be handled appropriately. To recover, it is necessary to erase corrupted flash blocks. There’s an application note which describes this in details: