XMC4300: General questions about flash read protection

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

cross mob
User14604
Level 4
Level 4
First solution authored
Hello forum,

we plan to integrate the flash read protection feature into our product using a XMC4300. I'd like to make sure my plans are correct before start.

We use a bootloader (placed in first 16 kB of flash), which receives the firmware (on UART). The bootloader will install the global read protection on-demand (by a command). For application firmware update, it will use the "Disable Read Protection" (see table 8-4 in XMC4300 manual) flash command before update and the "Resume Protection" (table 8-4) command after successful update.
To be able to exchange the bootloader itself (e.g. by JTAG-interfaced J-Flash), I need to remove the read protection permanently by erasing UCB.

1) I understood that installing the read protection requires writing the User Control Block (UCB) for user 0. It is only possible to write to that UCB 4 times, even if I only access user 0? (User 0 contains the global read protect bit.)
2) Does disabling the read protection automatically erase the full chip or do I need to make that happen manually?
3) When I'd like to attach JTAG again, will a temporarily disabled read protection (by "Disable Read Protection" command) work? I assume the JTAG connect command will perform a controller reset, which will re-enable the read protection again, will it?
4) Does the enabled read protection affect the ability to read flash in my bootloader itself?

Best regards,
Ernie T.
0 Likes
0 Replies