Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

I am using XMC4500 controller and using the FLASH002 Dave app to write a Page in controller's Flash.

I first wrote 256 byte of data on some location(Say at address 0x0C001234) using FLASH002 app then i try to re-program the same page with different data. After this reprogramming all address locations on that page becomes 0xAA and also double bit error is getting detected on second programming attempt. Reprogramming(With different data) works fine if an erase is done between two programmings attempts.

I tried this for 3-4 pages so it is not an Flash Hardware issue.Is this something to do with flash protection or UCB?Currently i am not using any Flash protection and UCB(Default Settings).


Thanks
Rahul
0 Likes
6 Replies
Not applicable
Hi Rahul,

The flash must be erase every time before programming. In Flash we can write only ones from zeros. The API of FLASH002 is not automatic erasing the flash before programming. You need to do this by yourself.

Best regards,
Sophia
0 Likes
Not applicable
Hello Sophia,

Thanks or the reply.

Could you please suggest some work-around to suppress this behavior?

As in my case i have to write a page two times(First time to program and second time to corrupt the page).Once corrupted i will erase and program fresh.But i dont want double bit error on second programming attempt.

Please suggest.


Thanks,
Rahul Sharma
0 Likes
Not applicable
Hi Rahul,

I'm so sorry that I don't really understand your intention. Do you mean that you don't want double bit error occur in hardware during 2nd programming attempt?

Best regards,
Sophia
0 Likes
Not applicable
Hello Sophia,

When I do second programming then double bit error gets detected. and when this corrupted data is read then bus fault exception comes.What i need is, any mechanism by which i can still read the corrupted data and bus fault exception does not gets generated.

Thanks,
Rahul Sharma
0 Likes
Not applicable
Hi Rahul,

if you Need this behaviour, so why not handling the exception ?
0 Likes
Not applicable
Hi Rahul,

The double-bit error traps are enabled by default. You could disable it by setting MARP.TRAPDIS=1 (refer to Pg423 8.7.3.4 Margin Check Control Register of xmc4500_rm_v1+2_2012_12_).

Best regards,
Sophia
0 Likes