Difference between revisions of "XMC4xxx series"
Line 2: | Line 2: | ||
This article describes device specifics of the Infineon XMC 4500 microcontroller. |
This article describes device specifics of the Infineon XMC 4500 microcontroller. |
||
− | |||
== Flash sector limitations == |
== Flash sector limitations == |
||
− | The Infineon |
+ | The Infineon XMC4500 device series comes with the following physical sector layout: |
− | |||
*2 * 64 kB |
*2 * 64 kB |
||
*1 * 128 kB |
*1 * 128 kB |
||
*x * 256 kB |
*x * 256 kB |
||
+ | The first 64 KB physical sector consists of four logical 16 KB sectors which can be accessed (erased) individually. Therefore instead of erasing the whole 64 KB physical sector, the first sector can be erased 16 KB wise and therefore, e.g. used to have a bootloader which does not change in the first 16 KB logical sector while having the application starting at offset 32KB. This way, the application can be exchanged without erasing the bootloader. |
||
− | The first 64 kB for example are split up in 4 * 16 kB logical sectors which can be accessed individually. |
||
− | That way the flash memory in the first physical sector can be used for different scenarios where not the whole memory is needed to store the application. |
||
− | |||
− | For example if a bootloader is used together with a application it can be beneficial to store the bootloader e.g. in the first logical sector and the application starting from the second logical sector. |
||
− | That way no memory gets wasted. |
||
+ | However, the J-Link software uses the physical sector layout for two reasons: |
||
− | The J-Link uses the physical sectors when erasing and writing to flash, because there are disadvantages when using logical sectors that need to be taken into account: |
||
*Writing into logical flash sectors disturbs adjacent data in the remaining logical sectors and thus increasing the risk of having incorrect data stored in the remaining memory sectors |
*Writing into logical flash sectors disturbs adjacent data in the remaining logical sectors and thus increasing the risk of having incorrect data stored in the remaining memory sectors |
||
*Decrease of total flash erase cycles possible as a logical sector access promotes uneven memory degradation |
*Decrease of total flash erase cycles possible as a logical sector access promotes uneven memory degradation |
||
− | For further information regarding this, please refer to the technical reference manual of the XMC4500 series. |
+ | For further information regarding this, please refer to the technical reference manual of the Infineon XMC4500 series. |
− | However, under special circumstances customers may want to use the logical sector layout. For such scenarios, the J-Link DLL allows to read-modify-write flash |
+ | However, under special circumstances customers may want to use the logical sector layout. For such scenarios, the J-Link DLL allows to perform a read-modify-write to a flash sector in order to *not* erase certain parts of the physical sector when programming / erasing logical sectors. Further information regarding this as well as an example can be found here: LINK |
Revision as of 17:47, 13 March 2017
Contents
This article describes device specifics of the Infineon XMC 4500 microcontroller.
Flash sector limitations
The Infineon XMC4500 device series comes with the following physical sector layout:
- 2 * 64 kB
- 1 * 128 kB
- x * 256 kB
The first 64 KB physical sector consists of four logical 16 KB sectors which can be accessed (erased) individually. Therefore instead of erasing the whole 64 KB physical sector, the first sector can be erased 16 KB wise and therefore, e.g. used to have a bootloader which does not change in the first 16 KB logical sector while having the application starting at offset 32KB. This way, the application can be exchanged without erasing the bootloader.
However, the J-Link software uses the physical sector layout for two reasons:
- Writing into logical flash sectors disturbs adjacent data in the remaining logical sectors and thus increasing the risk of having incorrect data stored in the remaining memory sectors
- Decrease of total flash erase cycles possible as a logical sector access promotes uneven memory degradation
For further information regarding this, please refer to the technical reference manual of the Infineon XMC4500 series.
However, under special circumstances customers may want to use the logical sector layout. For such scenarios, the J-Link DLL allows to perform a read-modify-write to a flash sector in order to *not* erase certain parts of the physical sector when programming / erasing logical sectors. Further information regarding this as well as an example can be found here: LINK