Im working with MK22FN1M0AVLL12. It has 1MB of flash (2 flash blocks and no FlexNVM memory)
My code is into block 0 and the issue happens when i try to erase a sector which is into this block 0. (erasing into block 1 is ok).
I am not using any interrupt so I guess it is because it is not possible to execute code and erase a sector which is into the same block at the same time, am i right?, should i execute the erase and program code from RAM so it can works?
I did the same (execute code from flash) in a K60 which only had one flash block and then i could erase and program a sector successfully, why??
Maybe it is because it is only posible to erase a sector executing the code from flash in MCUs that only has one flash block???
Thanks and best regards.