Hi,
I'm using Ra6m1 MCU
I have 2 partition:
1. Bootloader partition: from 0x00000000 to 0x00010000 flash memory
2. Application partition : from 0x00010000 to 0x00080000
Problem: I want to use IWDT at Application partition, i have start iwdt at OFS0, but it not work.
However, if I change flash address of Application partition to 0x00000000 , IWDT work normally.
I thinks problem relates to option-setting memory location on flash. When i set start address at 0x00010000 (which is different from initital address 0x00000000 ) => option-setting memory address will start from 0x00010400 (arcording to "Renesas RA6M1 Group User's Manual: Hardware") , but system may only reads 0x00000400 so it keep iwdt disable.
So how can i solve this problem?
Thanks.
Hi Son,
Thanks for your reaching out to Renesas Engineering Community.
The Option Function Select Register 0 (OFS0) controls WDT and IWDT timers and it is located in code flash area at 0x0000_0400. The OFS registers are read when the device boots.
Obviously, if you set the start address of your application (with no bootloader) to 0x0000_0000, the OFS registers will be set by the application and the IWDT will work normally.
However, if you use a bootloader starting at 0x0000_0000, these registers will be set by the bootloader project. In the bootloader project you need to erase the entire code flash block, where the OFS0 register exists, and write it again with new values. Then, IWDT will be running as expected.
Let us know if you need more clarifications.
Regards,
AZ
Is there any ways to make the system ignore 0x0000_0400 area and reads 0x0000_1400 area's values ?
The option-setting memory (where 0FS0 register exists) determines the state of the MCU after a reset. So this particular address will be read to configure WDT and IWDT when the system boots. The way to change these registers is from the bootloader image, as I explained.
You may find some useful information about bootloader applications here.
Let us know if you have further questions.
Thanks for answer, it very helpful for me.