Hello SEGGER Team,
I have made some experiments with my EFM32HG322F64 MCU and experienced the following. If I want to write 1024 or more Bytes into the FLASH then other parts of the given sectors get erased (please see dump1.bin). This MCU I’m using has 64 kByte FLASH and 1 kByte sector size, but I managed to reproduce this phenomenon with other MCUs and chips as well, so it is definitely not the fault of the MCU I’m using right now. It is also important to mention that this issue only occurs if I write 1024 or more Bytes and the sector size did not influence this (I tried with other MCUs as well where the sector size was smaller or larger). However, if I write less than 1024 Bytes then there is no problem, regardless of the starting address and/or crossing sector boundary.
Let’s say I want to write 1024 Bytes 0xAAs in the range of 0x000 – 0x400 sector. Everything works well. However if I cross the sector boundary, let’s say 0x001 – 0x401 then other parts of the given sectors gets erased (other sectors remain intact, please see dump1.png and dump1.bin):
![](https://forum.segger.com/index.php/Attachment/5158-dump1-PNG/?thumbnail=1&s=df4ec2c071f6a825a7b59eab2146a2843cbf7dd1)
The interesting part is that if I create 3 kBytes of 0xBBs and first load it then this problem does not occur, so other parts of the sectors do not get erased (please see dump2.png and dump2.bin):
![](https://forum.segger.com/index.php/Attachment/5159-dump2-PNG/?thumbnail=1&s=df4ec2c071f6a825a7b59eab2146a2843cbf7dd1)
I have collected the commands I’m using via J-Link Commander in .txt files (JLinkCommanderCommands1.txt and JLinkCommanderCommands2.txt) and I also attached the .bin files so that you can also reproduce the issue.
Have you seen such an issue before and could you propose how to fix it?
Thanks in advance
I have made some experiments with my EFM32HG322F64 MCU and experienced the following. If I want to write 1024 or more Bytes into the FLASH then other parts of the given sectors get erased (please see dump1.bin). This MCU I’m using has 64 kByte FLASH and 1 kByte sector size, but I managed to reproduce this phenomenon with other MCUs and chips as well, so it is definitely not the fault of the MCU I’m using right now. It is also important to mention that this issue only occurs if I write 1024 or more Bytes and the sector size did not influence this (I tried with other MCUs as well where the sector size was smaller or larger). However, if I write less than 1024 Bytes then there is no problem, regardless of the starting address and/or crossing sector boundary.
Let’s say I want to write 1024 Bytes 0xAAs in the range of 0x000 – 0x400 sector. Everything works well. However if I cross the sector boundary, let’s say 0x001 – 0x401 then other parts of the given sectors gets erased (other sectors remain intact, please see dump1.png and dump1.bin):
The interesting part is that if I create 3 kBytes of 0xBBs and first load it then this problem does not occur, so other parts of the sectors do not get erased (please see dump2.png and dump2.bin):
I have collected the commands I’m using via J-Link Commander in .txt files (JLinkCommanderCommands1.txt and JLinkCommanderCommands2.txt) and I also attached the .bin files so that you can also reproduce the issue.
Have you seen such an issue before and could you propose how to fix it?
Thanks in advance