Hello,
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?
Any solutions?
Regards!
Hello,
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.
Regards!
Hi Tomasz:
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.
Regards
Daniel
Hi Daniel,
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?
Hi Tomasz:
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.
https://www.nxp.com/docs/en/application-note/AN4695.pdf?fsrch=1&sr=1&pageNum=1
I hope it helps
Have a great day,
Daniel
Hi 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 set:
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?
Regards!