Disable flash protection on Infineon AURIX TC2xx and TC3xx
•Open the flash device configuration in winIDEA. Select Hardware > SoC Options > Programming.
•Assign the correct initialization script as a Pre operation
•(optional) Enter the password and UC parameters
•Run the flash operation
•Assign the resume script as a Post operation to restore protection
Infineon AURIX TC2xx and TC3xx devices can protect internal SoC flash from unauthorized changes. When a flash section is protected, winIDEA cannot program or erase it until protection is temporarily lifted.
This guide shows you how to use winIDEA's initialization scripts to disable protection on Program Flash (PFLASH), Data Flash (DFLASH), or Boot Mode Header Location (BMHD) before a flash operation, and restore it afterward.
•winIDEA returns an error when trying to program or erase a protected flash area
•You need to flash a device that has PFLASH, DFLASH, or BMHD protection enabled in UCBs
•winIDEA 9.17.146 or newer
•BlueBox
•Infineon AGBT Active Probe / Infineon DAP/DAPE Active Probe / 10-pin 1.27mm Infineon DAP2 Wide Debug Adapter / 22-pin ERF8 DAP2 Debug Adapter
•winIDEA 9.17.146 or newer
•BlueBox
•Matching target connection
•Basic familiarity with flash operations in winIDEA
•If your flash section is password-protected, have the 256-bit password ready (eight 32-bit words: PW0 to PW7)
The scripts ship with winIDEA. You do not need to download or build them.
Infineon AURIX device |
Initialization script |
Operation |
Script function |
|---|---|---|---|
TC2xx |
TC2xx_DisablePFLASHProtection.cpp |
Pre operation |
Disables PFLASH protection on TC2xx |
TC2xx |
TC2xx_DisableDFLASHProtection.cpp |
Pre operation |
Disables DFLASH protection on TC2xx |
TC2xx |
TC2xx_DisableBMHDProtection.cpp |
Pre operation |
Disables BMHD protection on TC2xx |
TC3xx |
TC3xx_DisablePFLASHProtection.cpp |
Pre operation |
Disables PFLASH protection on TC3xx |
TC3xx |
TC3xx_DisableDFLASHProtection.cpp |
Pre operation |
Disables DFLASH protection on TC3xx |
TC3xx |
TC3xx_DisableBMHDProtection.cpp |
Pre operation |
Disables BMHD protection on TC3xx |
TC2xx and TC3xx |
TCxxx_ResumeFLASHProtection.cpp |
Post operation |
Resumes PFLASH / DFLASH / BMHD protection on TC2xx / TC3xx |
|
Open Hardware | Flash Device | Configure. |
|
Select Pre operation | Default | Custom. |
|
Press the arrow button | From SFR folder | script to disable PFLASH / DFLASH / BMHD protection. |

|
Select the arrow button | Parameters. |
•Enter 8 password values (long format). If the Flash section is protected by a password, the password is entered as a script parameter. A 256-bit password is written in eight 32-bit WORDS: PW0 – PW7.
•UC parameter configuration – Initialization scripts have default UC parameters values to cover most common protection scenarios. Enter an additional parameter, e.g. UC=0x17. See the microcontroller reference manual for more information about the UC parameter values.
|
Enter parameters (password) in the Edit options. |

Flash protection is restored automatically after every CPU reset which is also executed at the end of the debug download. However, when “live” modifying flash e.g. through the Memory debug window or when applying software breakpoints in Program Flash during debugging, Flash protection has to be restored by winIDEA.
To restore protection after a flash programming operation, select TCxxx_ResumeFLASHProtection.cpp initialization script in the Post operation section within the same dialog.