I have problem with using pflash example and my timer IRQ.
If I initialize and start my timer (pit or lptmr) sth goes wrong. I cant erase flash memory.
Can I use any IRQ and erase flash?
If an interrupt occurs during a flash erase / program operation, the read while write restriction will be violated if the interrupt service routine code is located in the same flash block as the erase operation is occurring on. so you can disable / enable interrupts before / after the flash command operation. If interrupts are disabled, any interrupt that occurs during the flash operation will be pending when interrupts are re-enabled.
Thanks for Your response!
Ok i understand it.
But what if i need my irq and cant disable/enable interrupts before/after flash operation?
Is there any solutions?
I would suggest you refer to the AN4695, this application note discuss important considerations and guidelines for implementing in-software flash programming on Kinetis and Coldfire.
I hope it helps
Have a great day,Daniel
I found this:
So I have to relocate my ISR into RAM.
I found this question:How to relocate interrupt vector table in MCUXpresso there is (I thought) the solution.
I use FRDM KL26Z.
My default settings:
I added in startup file:
And this in pflash.c file:
Now i got the same like before. Resets like this:
What is wrong now? Is there something more?
I'm still looking for the solution.
Does anybody have any code with irq and flash? Or with relocating IRQ into RAM?
I try change it for my applications.
Retrieving data ...