Aug 27, 2021
01:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 27, 2021
01:36 AM
Hi,
I try to erase Pflash section in my SW.
I try to implement my code according to training data below:
https://www.infineon.com/dgdl/Infineon-AURIX_Flash_Programming_1_KIT_TC297_TFT-Training-v01_00-EN.pd...
And this is my code for erase:
When i try this i got a hardware reset.
I do not try to erase where my SW is placed in the Pflash memory. the SW is at different place.
SW is at 0xA000 0000 and erasing must be at 0xA010 0000.
the reset occurs when IfxFlash_eraseMultipleSectors is executed.
Can anyone help me further?
Thx
tc387
I try to erase Pflash section in my SW.
I try to implement my code according to training data below:
https://www.infineon.com/dgdl/Infineon-AURIX_Flash_Programming_1_KIT_TC297_TFT-Training-v01_00-EN.pd...
And this is my code for erase:
IfxFlash_FlashType FlashType = m_IfxFLASHflashtype(u32sectorAddr);
/* Get the current password of the Safety WatchDog module */
uint16 u16endInitSafetyPassword = IfxScuWdt_getSafetyWatchdogPasswordInline();
IfxScuWdt_clearSafetyEndinitInline(u16endInitSafetyPassword); /* Disable EndInit protection */
/* Erase the sector */
IfxFlash_eraseMultipleSectors(u32sectorAddr,u8numSec);
/* Wait until the sector is erased */
IfxFlash_waitUnbusy(FLASH_MODULE, FlashType);
IfxScuWdt_setSafetyEndinitInline(u16endInitSafetyPassword); /* Enable EndInit protection
When i try this i got a hardware reset.
I do not try to erase where my SW is placed in the Pflash memory. the SW is at different place.
SW is at 0xA000 0000 and erasing must be at 0xA010 0000.
the reset occurs when IfxFlash_eraseMultipleSectors is executed.
Can anyone help me further?
Thx
tc387
Solved! Go to Solution.
1 Solution
Aug 31, 2021
01:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 31, 2021
01:40 AM
When you disable the endinit protection then the watchdog goes in timeout mode and will begin to count also when he is switch off. If the endinit protection is not enabled later in time then a watchdog reset will be occur.
When you erase multiple sectors then this can be need more time than the timeout mode allowed.
Enable endinit protection directly after IfxFlash_eraseMultipleSectors before IfxFlash_waitUnbusy. Only function IfxFlash_eraseMultipleSectors must be executed with disabled endinit protection.
When you erase multiple sectors then this can be need more time than the timeout mode allowed.
Enable endinit protection directly after IfxFlash_eraseMultipleSectors before IfxFlash_waitUnbusy. Only function IfxFlash_eraseMultipleSectors must be executed with disabled endinit protection.
2 Replies
Aug 27, 2021
07:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 27, 2021
07:48 AM
When you write or erase to PFLASH, it locks the entire PFLASH bank, not just the sector - see 6.5.2.2.2 Command Sequences on page 396 of AURIXTC3XX_um_part1_v2.0.pdf.
Code for erasing and writing is copied to RAM and executed from there. It is possible to write/erase to a different bank - e.g., execute from PF0 and write to PF1.
Code for erasing and writing is copied to RAM and executed from there. It is possible to write/erase to a different bank - e.g., execute from PF0 and write to PF1.
Aug 31, 2021
01:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 31, 2021
01:40 AM
When you disable the endinit protection then the watchdog goes in timeout mode and will begin to count also when he is switch off. If the endinit protection is not enabled later in time then a watchdog reset will be occur.
When you erase multiple sectors then this can be need more time than the timeout mode allowed.
Enable endinit protection directly after IfxFlash_eraseMultipleSectors before IfxFlash_waitUnbusy. Only function IfxFlash_eraseMultipleSectors must be executed with disabled endinit protection.
When you erase multiple sectors then this can be need more time than the timeout mode allowed.
Enable endinit protection directly after IfxFlash_eraseMultipleSectors before IfxFlash_waitUnbusy. Only function IfxFlash_eraseMultipleSectors must be executed with disabled endinit protection.