I have a strange problem with the device mentioned above. We have a bootloader in the last sector of the flash, from 0xFFFF8000 to 0xFFFFFFFF. The problem is, the bootloader has to be changed due to constructional changes. Everything goes well, including the erase of this last sector, until writing to the address of the reset vector (the API can only write 8 bytes, so it is not just the last 4, but the last 8 bytes). The flash api, which can be found on renesas.com, successfully erases the last sector, including the reset vector, but we're unable to write the reset vector, although all the previous addresses (up to 0xFFFFFFF8) can be written. The datasheets do not mention anything about restrictions of writing the reset vector, or the last flash sector. Could you help me please in this problem?
Thanks in advance:
how do you check this?
When using the emulator E8a you cannot rewrite the reset vector because it is used by the emulator.
You can only write the reset vector when the software runs without debugger connection.
We realized this before, so we tried it in ew1 mode, running from our flash block at 0xfffc0xxx, without the debugger of course. Even without debugger connection, the firmware can't overwrite the reset vector. The problem is solved though, after going out and executing from RAM, the reset vector becomes writeable. Interesting defect, without any documentation of it... The controller should be able to write to the reset vector's address running from flash, but it is not. Thanks for help though!