Hello everyone,
I am working on the km34, i wants to read/write in the internal flash of the km34. but my problem is when i am write on the flash while interrupt of ADC and timer it reset or generate the hardfault error. so i change the vector table into the ram and assign the address of the new vector table location to the VTOR, still i am not able write on the internal flash of the km34, still it continuous reset the code.
thank you
hi,RajPadmani
Thank you for your interest in NXP Semiconductor products and the opportunity to serve you, I will gladly help you with this.
Interrupts are not allowed during Flash read and write operations. Ensure that all unnecessary interrupts are disabled before performing flash read and write operations. If you have already moved the vector table to RAM and are still encountering issues, try checking whether the NVIC's VTOR register is correctly set and ensure that the RAM region is initialized and available.
BR
Xu Zhang
Hi,RajPadmani
You mentioned that you do not want to disable interrupts during Flash operations. If the interrupt vector table is in the same block as the flash area you want to write to, you can't enter the interrupt while reading or writing flash. Make sure the interrupt vector table is not in the same block as the flash area you are writing to.
In addition, sometimes in order not to affect the erase flash, you can put the interrupt vector table in RAM, but the interrupt vector table and the interrupt service program must be placed in RAM, and the VTOR reg must be modified. If you use SRAM_8 in your application, check that your linker script defines the SRAM_8 region correctly and that it is not used by other parts.
BR
Xu Zhang