May 15, 2017
03:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 15, 2017
03:29 AM
Good day,
I have read "XMC4500 Reference Manual"
chapter 8.4.8 Flash Protection, but it is still unclear for me how it should be realized?
Say, I choose to set up "Flash Read Protection", using option:
– UCB0: Read protection that can be disabled with the password of UCB0 for whole Flash.
For that, I shall set bit PROCON0[15] = RPRO = 1 in UCB0
Meanwhile, description for it says:
This bit indicates whether read protection is
configured for PFLASH by user 0.
0B No read protection configured
1B Read protection and globalwrite protection is
configured by user 0 (master user)
So, looks like it is Global R/W Protection bit.
Bits PROCON0[0:10] - write protection per sectors - can be used independently.
A “UCB” is a specific logical sector contained in the configuration sector.
Apparently, UCB blocks are not affected, when whole Flash is erased by Programmator.
As far UCB blocks may be rewritten reliably only 4 times!
It means theoretically, that if only "Read Protection" was installed, you are able to rewrite Flash, but as far protection still in place,
you do not able to verify it without erasing UCB0 block as well, applying special procedure.
Global R/W Protection as well may be disabled temporary, o.w. until next System Reset. It is used in MemTool. (See below)
But, it requires ASC Bootstrap connection - through P1.4 RxD, P1.5 TxD lines.
BR
K
I have read "XMC4500 Reference Manual"
chapter 8.4.8 Flash Protection, but it is still unclear for me how it should be realized?
Say, I choose to set up "Flash Read Protection", using option:
– UCB0: Read protection that can be disabled with the password of UCB0 for whole Flash.
For that, I shall set bit PROCON0[15] = RPRO = 1 in UCB0
Meanwhile, description for it says:
This bit indicates whether read protection is
configured for PFLASH by user 0.
0B No read protection configured
1B Read protection and globalwrite protection is
configured by user 0 (master user)
So, looks like it is Global R/W Protection bit.
Bits PROCON0[0:10] - write protection per sectors - can be used independently.
A “UCB” is a specific logical sector contained in the configuration sector.
Apparently, UCB blocks are not affected, when whole Flash is erased by Programmator.
As far UCB blocks may be rewritten reliably only 4 times!
It means theoretically, that if only "Read Protection" was installed, you are able to rewrite Flash, but as far protection still in place,
you do not able to verify it without erasing UCB0 block as well, applying special procedure.
Global R/W Protection as well may be disabled temporary, o.w. until next System Reset. It is used in MemTool. (See below)
But, it requires ASC Bootstrap connection - through P1.4 RxD, P1.5 TxD lines.
BR
K
- Tags:
- IFX
4 Replies
May 18, 2017
04:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 18, 2017
04:30 AM
I have found post in thread:
https://www.infineonforums.com/threads/3240-Flash-protection?highlight=Bootloader
When you program a UCB with password and R/W sector protect, the UCB is considered operational. At this stage you can always temporary
unprotect the flash for software update with the correct password. And the MCU will return to protect state after a reset.
Sounds great, but still unclear how to achieve this?
Unfortunately Travis has not visited this forum more than 6 monts 😞
https://www.infineonforums.com/threads/3240-Flash-protection?highlight=Bootloader
When you program a UCB with password and R/W sector protect, the UCB is considered operational. At this stage you can always temporary
unprotect the flash for software update with the correct password. And the MCU will return to protect state after a reset.
Sounds great, but still unclear how to achieve this?
Unfortunately Travis has not visited this forum more than 6 monts 😞
May 19, 2017
12:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 19, 2017
12:28 AM
Get MemTool 4.07.03 and connect to it using ASC Bootstrap (P1.4 RxD, P1.5 TxD) at speed 57600.

Meanwhile, to activate HW Protect button, in upper left field shall be vailid address space
and PFLASH must be enabled. Other way to make it active - load some .HEX file.

Then protection may be activated. Please configure Setup first.
"Try to disable protection.." - is most important option, as far it removes
protection temporary, not erasing UCB0 block!

Press OK on warning message and get Flash protected:

After reconnect, as far protection temporary removed, it looks as below:

I was able to Erase and Program Flash successfully in this mode, but Verify option failed on some reason.
Meanwhile, to activate HW Protect button, in upper left field shall be vailid address space
and PFLASH must be enabled. Other way to make it active - load some .HEX file.
Then protection may be activated. Please configure Setup first.
"Try to disable protection.." - is most important option, as far it removes
protection temporary, not erasing UCB0 block!
Press OK on warning message and get Flash protected:
After reconnect, as far protection temporary removed, it looks as below:
I was able to Erase and Program Flash successfully in this mode, but Verify option failed on some reason.
May 19, 2017
04:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 19, 2017
04:58 AM
XMCLoader.exe is able to do similar job.
It is located in "TOO_Bootloader_ASC_examples_v1_1"
XMC4000_ASCBootloader -> XMCLoad -> Release -> XMCLoad.exe
It loads ASCLoader.hex into PSRAM ( 0x1000 0000 ) and starts it.
Mentioned example contains source codes for ASCLoader.hex (Dave 3, Keil, IAR),
and for XMCLoad.exe as well.
I was able to connect on 57600bps speed, next 4096 must be choosen 🙂
It is located in "TOO_Bootloader_ASC_examples_v1_1"
XMC4000_ASCBootloader -> XMCLoad -> Release -> XMCLoad.exe
It loads ASCLoader.hex into PSRAM ( 0x1000 0000 ) and starts it.
Mentioned example contains source codes for ASCLoader.hex (Dave 3, Keil, IAR),
and for XMCLoad.exe as well.
I was able to connect on 57600bps speed, next 4096 must be choosen 🙂
May 19, 2017
06:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 19, 2017
06:30 AM
So, let's protect Flash, using XMCLoader:

And unprotect then:

Looks like it is can be done relaibly 4 times only, as far seems that XMCLoader erases UCB0 every time
In case Flash Protection detected, NO option cause program termination.
And unprotect then:
Looks like it is can be done relaibly 4 times only, as far seems that XMCLoader erases UCB0 every time
In case Flash Protection detected, NO option cause program termination.