Hi, I am trying to run the Flash Partition Example code from S32DS on S32K144EVB. Function FLASH_DRV_CommandSequence() is leading to default ISR when called. Interestingly it works fine when we do STEP IN of each instruction in that function, but if function is run at once, its going to default ISR.
Directive START_FUNCTION_DEFINITION_RAMSECTION is defined above the function definition to load into RAM.
Please let me know what changes/configurations to be done to make it work.
Could you please have a try the below two methods.
1.Perform a mass erase.
The FlexNVM memory is partitioned to EEPROM use and is blocked for some erase commands (Erase Sector and Erase Block). As a consequence, loading the program to flash memory may fail on some debuggers. Please perform a mass erase operation on Flash to remove this partitioning after running the example to be able to update your application on target.
2.Define FLASH_TARGET to disable cache and try again.
/* Disable cache to ensure that all flash operations will take effect instantly,
* this is device dependent */
#ifndef FLASH_TARGET
#ifdef S32K144_SERIES
MSCM->OCMDR[0u] |= MSCM_OCMDR_OCM1(0x3u);
MSCM->OCMDR[1u] |= MSCM_OCMDR_OCM1(0x3u);
#endif /* S32K144_SERIES */
#endif /* FLASH_TARGET */
Hi Senlent,
I tried with both methods you mentioned above but issue is still there. Below are observations with and without methods you mentioned above:
1) Without above methods - No Mass erase and no cache disable:
Control is jumping to default ISR at FLASH_DRV_CommandSequence() and this function is called from FLASH_DRV_SetFlexRamFunction()
2) Without above methods - Mass erase and cache disable, FLASH_TARGET defined:
Control is jumping to default ISR at FLASH_DRV_CommandSequence() and this function is called from FLASH_DRV_DEFlashPartition()
Thank you for the information you provided, I will confirm with you again:
1. You have not made any modifications to the routine
2. Can you tell me the part number of your MCU?
3. What IDE and RTM version are you using?
4. Tell me which debugger you use
I will try to reproduce your problem. If I cannot reproduce it, I can't give you a reasonable explanation.
Hi Senlent,
Below are details you asked for:
1. You have not made any modifications to the routine - No
2. Can you tell me the part number of your MCU - S32K144 EVM - SCH-29248 REV C1
3. What IDE and RTM version are you using - S32DS 3.5 and S32SDK_S32K1XX_RTM_4.0.1
4. Tell me which debugger you use - PE Open SDA
This is a known bug and has been fixed in the new version.
You can modify it like this:
"peripherals_flash_FTFC.c"
Hi@Senlent
What do you mean by the new version? SDK or S32DS?
And where can find the table in picture.
tku