Inconsistency between RM0403 flash registers description and SPC582B50
- May 24, 2020
- 4 replies
- 2681 views
Hi,
One question at the beginning: how to clear interrupt flag in SPC582B50 for "Flash controller Prog/Erase/Suspend IRQ" (vector 185)? I can't see any related interrupt flag in the manual, MCR.DONE also cannot be cleared manually.
Once IRQ related to flash erase is issued, the IRQ_Handler is called over and over until I disable the interrupt at all (MCR.PECIE = 0).
-----
I found some incosistencies between Reference Manual RM0403 and actual behaviour of SPC582B50 flash registers.
According to RM section 32.3.2.3 to 6 - all LOCKx registers should be set to all-1s after reset.
I observe otherwise:

The same sections of RM say:
"The LOCK field is not writable:
– Once an Interlock Write is completed until MCR.DONE is set."
I observe, that write to LOCKx registers (restoring the lock) is not possible right after MCR.DONE is set. I also need to clear MCR.EHV, then I can write to LOCKx registers.
Can you please confirm which one is correct?
Best,
Yannek
