For a project I'm planning to add a 32k bootloader to our 256k RA2L1 to provide the functionality of in-field software updates. When I read the user manual, it states: "The MCU supports programming of the flash memory by the user program. The programming commands can be used with user programs for writing to the code and data flash memory. This enables updates to the user programs and overwriting of constant data fields."
Afterwards, there's the following diagram:
The diagram states that the Code flash memory can only be programmed and erased when the User program is ran in internal SRAM. However I'm not certain wether this is ALWAYS the case, or just when making use of "background operation facility".
In short my question is: Can I program/erase code flash memory, from a user program running in code flash memory when not making use of background operation?
You just have to declare some variable as no_init and write there your command. I reccomend you that this command is something a bit complicated to get randomly. For example four bytes not containing 0x00…
Yes, you cannot program code flash by code running from code flash on the RA2l1, only from code running from a location not in code flash (i.e. SRAM).
Background operation only applies to the programming…