-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flashing ek_ra8m1/mck_ra8t1 may sometimes permamently change reserved part OFS area at 0300A270 preventing it from correctly flashing ever again #83300
Comments
Can't confirm that it is an binary that caused it, issue is observable next time flashing with different binary. Relevant part of
|
hi @piotrrak , have you flashed these board before using e2studio? |
@duynguyenxa I am bit worried to use those now, because if it did reproduce for example on And that would be no in the case mdk-ra8t1. I am getting spare mdk-ra8t1 (just a board), one has become available on DigiKey and is already in shipping. With bit of luck I should have it soonish. Would you mind to tell me why do you ask? |
@piotrrak , could you try to use the "Renesas Device partition manager" on the EKRA8M1 and reset the board back to factory state then flash the Zephyr image. The e2studio when use for flashing will automatically calculate the memory boundaries of the image then pass them e2-server-gdb program which then sets those settings on the device TZ IDAU, this will prevent flashing other image that has boundary outside of the previous image flash using e2studio, you can check this for reference: https://community.renesas.com/mcu-mpu/ra/f/forum/18083/tz-idau-memory-boundaries-calculation/59655 |
@duynguyenxa I can't do that today but I'll try that tomorrow. Please do note that after it happens, command:
Ie. flash write this location won't revert bits that are already In C I would model behavior I did observe as: void write_0300_A270(uint32_t new_value32)
{
uint32_t prev_flash_value = *((uint32_t*)0x300A270);
*((uint32_t*)0x300A270) = prev_flash_value & new_value32;
} Also by mistake I've bought RA6T2 not RA8T1 in crazy pre-xmas euphoria (was happy that it became available). |
@KhiemNguyenT @soburi (RA platform) could you take a look? |
@fabiobaltieri Hi, this one is puzzling. In the search for an answer I've checked |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
I don't have the RA8 evaluation environment, but can you give any insight? |
Describe the bug
Upon flashing zephyr binary OFS flash part of flash area changes at address 0x300A270 value at first to
0x00_00_00_ff
, preventing from passing failing validation after flashing.According to specification
PBPS_SEC: 0x0300_A260, 0x0300_A264, 0x0300_A268, 0x0300_A26C
which is factory shipped with with value0xFF
One is able to block flash writes by fusing bits of this area to '0'
Location
0x0300_A270
is reserved and according to specification should be written with values '0xFF'For some unknown to me reason flashing zephyr binaries may result in fusing those bits also to 0
After that it is impossible to flash any binary with verification using JLink.
Currently zephyr GAP fills this area with correct values according to specification 'FF'.
Linker script puts correct values in
.option_setting_s
at specific locations.Reserved locations in between are correctly filled with
0xff
yet sometimes this area becomes fused first to0x00_00_00_FF
Issue exhibited on two board
mck_ra8t1
and later onek_ra8m1
To Reproduce
Unknown?
Expected behavior
Area at
0x0300_A270:0x300_A273
is never written to or always written with value '0xFF' to prevent board from ever being flashed by usual means.Impact
Board won't pass validation during flashing and is impossible to correctly flash using method used by zephyr.
Logs and console output
Incorrect value in flash that can't be reverted back to
0xFF_FF_FF_FF
:Zephyr correct ELF.
Environment (please complete the following information):
Additional context
The same issue was observed before with
mck_ra8t1
and exactly same value was written there.Please see an issue: #83010 where I described when I hit this exact problem first time.
I have too little exposure if this issue is only related to zephyr since I have too little exposure to this MCU family.
Although it did happen to me with zephyr twice so far and in my eyes has pretty severe consequences.
I have raised this issue asking for help on Renesas forum asking for help few days before I knew little more, but it is pending still moderation. Thus for now I have no input from board manufacturer.
The text was updated successfully, but these errors were encountered: