Am using RX66N chip, embOs operating system, developing in e2Studio with RXCC compiler.
Using Liner mode in flash.
Writing/Erasing any block in Bank-0 (FFC0 0000[FLASH_CF_BLOCK_133] - FFDF FFFF[FLASH_CF_BLOCK_74]) is causing segmentation fault in free run.
Thread #1 1 (single core) [core: 0] (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
If I step through the code using debugger, am not seeing any issue.
Can write/erase any block in Bank-1(FFE0 FFFF - FFFF FFFF) without any issue.
From bootloader(not having OS), able to write to both Bank-0 and Bank-1 (FFC0 0000 - FFFF FFFF) without any issue.
Anyone faced this issue? Thanks for answering.
This is just a guess, but I believe your code might be trying to access the code-flash while it is being programmed. Note the conditions for "background operations":
Am not using non-blocking mode. Its in blocking mode.Update: If a delay of atleast 1ms is added after P/E mode enter, before flash write, its working. Need to identify why that delay is required.
Is adding 1ms delay going to be a problem? Or we can now consider this issue solved now?
JBIf this response, or one provided by another user, answers your question, please verify the answer. Thank you!Renesas Engineering Community Moderatorhttps://community.renesas.com/https://academy.renesas.com/https://en-support.renesas.com/knowledgeBase/
Hi JB, adding 1ms delay will not be problem. But we do not prefer fixing an issue by just adding dealy without understanding why its required, it may break again in future. So want to know the root cause.