Hi Lukaz,
are you using a read-while-write flash?
If your answer is no:
You can't write to the flash and exectue from it at the same time (the flash write function needs to be located in RAM too).
If you can't disable interrupts you will have to find another solution. Examples would be:
- copying everything that gets executed while the flash is written to to internal RAM after booting and execute from there (or all code if your application is small enough), use flash only as data storage and for booting
- use a second flash as data storage
- execute from external SDRAM and use flash only as data storage and for booting
Kind regards,
Stefan