Tricore 27x Flash and Debug Iterface protection

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

cross mob
Level 2
Level 2
5 sign-ins 5 questions asked Welcome!

We want to protect our device from unwanted reads/writes/erases of PFLASH from external tools or other devices. I've found a lot of information on this subject but still have few open questions.
TC277 implements UCB's in DFLASH memory. UCB_PFLASH can be configured to protect PFLASH from write accesses and then also whole PFLASH memory from global read/write accesses.
Besides that it also contains UCB_DBG for setting the Debug Interface password. I've found a way to enable/disable Debug Interface here and tested it and it works as expected. When invalid password is supplied the Debug Interface remains locked and cannot be accessed by Infineon Memtool.
On this forum post user jferreira said the following:

The read protection will also enable a global write protection and the debugger will not have access anymore.
See Flash Protection in reference manual.

"For an effective IP protection the Flash read protection must be activated. This ensures
system wide that the Flash cannot be read from external or changed without

You need to foresee this and implement a backdoor if you wish to disable the protection using another communication interface.

My question is what is the best practice or intended practice to protect our device from IP theft and/or changes to already Flashed code?
1. Is it by locking the Debug Interface thru UCB_DBG?
2. Is it by installing global Flash read/write protection in UCB_PFLASH?
3. Both?
4. Other?
5. Why that way?

We are going to use booting from BMI with internal Flash boot option. So WITHOUT bootloader options.
1 Reply
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
UCB_DBG for sure. UCB_PFLASH is another layer on top of that, and I don't see that used often on the Americas side of the Atlantic, for what it's worth.

If you're using the HSM, you also need to protect the keys, and possibly the HSM code: see AP32387 and AP32389.