XDPP1100 Firmware Patch Programming Multiple Partitions
XDPP1100 Firmware Patch Programming Multiple Partitions
Intended audience
This document is intended to Engineer interested in programming configurations and firmware patches to
XDPP1100’s OTP.
Table of contents
Table of contents ............................................................................................................................ 1
1 Introduction .......................................................................................................................... 2
1.1 OTP Organization .................................................................................................................................... 2
1.2 Programming multiple patches .............................................................................................................. 3
2 Storing patch in same partition ............................................................................................... 4
2.1 Invalidating a patch................................................................................................................................. 4
2.1.1 Invalidating a patch through GUI ...................................................................................................... 4
2.1.2 Invalidating a patch programmatically ............................................................................................. 5
3 Storing patches in multiple partitions ...................................................................................... 6
3.1 Storing first patch in to partition 1 ......................................................................................................... 7
3.2 Storing a second patch in to partition 2 ................................................................................................. 7
3.2.1 Storing different FW patches at different OTP partitions ................................................................. 7
3.2.2 STEP 1a: Update linker_config.sct file for ARM-CC compiler ........................................................... 7
3.2.3 STEP 1b: Update linker_config.ld for GCC compiler ....................................................................... 10
3.2.4 STEP 2: Update Patch Entry ............................................................................................................. 12
3.2.5 STEP 3: Modify Makefile ................................................................................................................... 13
3.2.6 STEP 4: Build the project.................................................................................................................. 14
3.2.7 Update patch_init.c file ................................................................................................................... 15
3.2.8 Update partial_patch.cfg file ........................................................................................................... 16
Revision history............................................................................................................................. 17
Application Note Please read the Important Notice and Warnings at the end of this document V 1.0
www.infineon.com page 1 of 18 2020-01-22
XDPP1100 programming
Procedure
Introduction
1 Introduction
The Infineon “XDPP” family of Digital Controllers contains a built-in micro-controller for feature enhancement
or quick bug fixes. The micro-controller firmware (FW) can be updated or “patched” over the industry standard
I2C serial interface and saved in internal non-volatile memory (NVM). This document describes how to upload a
firmware patch over the I2C serial interface and also store a configuration to non-volatile memory (NVM).
// 3 .pass the parameters to FIRMWARE COMMAND DATA - PMBUs command to invalidate the patch
writeData(0) = &H10 // patch file command type ( 0x10 )
writeData(1) = 0
writeData(2) = 0
writeData(3) = partition_number // partition number – to invalidate partition – “1”
status = pmbWriteBlock(cmdMFR_FIRMWARE_COMMAND_DATA, writeData1)
// 4 .Execute the PMBUs command (FIRMWARE COMMAND) to invalidate the patch – pass the argument as
0x12 to invalidate
status = pmbWriteByte(cmdMFR_FIRMWARE_COMMAND, &H12)
// 5. Read back the status to check if the invalidate is success or fail. If status returned is 0 then success else
failed.
data = pmbReadBlock(cmdMFR_FIRMWARE_COMMAND_DATA, 4)
If (data(0) <> 0) Then
MessageBox.Show("Invalidating the patch failed")
End If
Catch ex As Exception
MessageBox.Show("Invalidating patch failed")
Finally
// 6. Enable the MMU by restoring the boot descriptor – which is saved in the first step in to data2.
status = i2cWrite4Bytes(data2, boot_descrptor_addr, &H10)
End Try
Note: The following steps are done after user has implemented the desired features in a newly created
patch project. It is therefore assumed that user already know how to create a new firmware patch.
Figure 6 Linker_Config.sct
Note: The above example is for 4 equal partitions, and we use second partition to store the patch.
Figure 9 Linker_config.ld
Figure 12 Patch_init.c
Update patch_entry:
Figure 15 Makefile
Modify as following:
After building the patch for partition 2. Store the patch in to partition 2 using the GUI tool like Figure 18.
Code Listing 2
void patch_entry(void)
{
// Initialize the .bss and .data section
memset(SECTION_BASE_ZI, 0, SECTION_LENGTH_ZI);
memcpy(SECTION_BASE_RW_DESTINATION, SECTION_BASE_RW_SOURCE,
SECTION_LENGTH_RW);
// Initialize ram execution section
memcpy(SECTION_BASE_RAM_EXEC_DESTINATION, SECTION_BASE_RAM_EXEC_SOURCE,
SECTION_LENGTH_RAM_EXEC);
SCU_SPARE_FF__SET(0x5971BBBBUL); // write the patch id to SCU spare
for simple test that patch loaded
user_drv_init();
}
Code Listing 3
[Patch]
startaddress = 0x20063C00
endaddress = 0x20063fff
minramsize = 0x300
[Version]
baseversion = 0x5F3C1F0D
newversion = 0x5971BBBB
Revision history
Revision history
Document Date of release Description of changes
version
1.0 2020-08-24 Initial version on the firmware Patch programming to OTP partition 2
IMPORTANT NOTICE
Edition 2020-01-22 The information contained in this application note is For further information on the product, technology,
given as a hint for the implementation of the product delivery terms and conditions and prices please
Published by only and shall in no event be regarded as a contact your nearest Infineon Technologies office
description or warranty of a certain functionality, (www.infineon.com).
Infineon Technologies AG condition or quality of the product. Before
81726 Munich, Germany implementation of the product, the recipient of this
application note must verify any function and other WARNINGS
technical information given herein in the real Due to technical requirements products may contain
© 2021 Infineon Technologies AG. application. Infineon Technologies hereby disclaims dangerous substances. For information on the types
any and all warranties and liabilities of any kind in question please contact your nearest Infineon
All Rights Reserved. (including without limitation warranties of non- Technologies office.
infringement of intellectual property rights of any
Do you have a question about this third party) with respect to any and all information
given in this application note. Except as otherwise explicitly approved by Infineon
document? Technologies in a written document signed by
authorized representatives of Infineon
Email: [email protected] The data contained in this document is exclusively Technologies, Infineon Technologies’ products may
intended for technically trained staff. It is the not be used in any applications where a failure of the
responsibility of customer’s technical departments product or any consequences of the use thereof can
Document reference to evaluate the suitability of the product for the reasonably be expected to result in personal injury.
AN_2101_PL88_2102_201614 intended application and the completeness of the
product information given in this document with
respect to such application.