The question about the flash operation in the KL36.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The question about the flash operation in the KL36.

467 Views
小勇邹
Contributor II

The SDK_1.3 of KL36 is used in my project.

My source code is in the attachment.

 

  1. I need to feed the external watch dog when erasing the flash. So I add a “flash_call_back” function to the “flashSSDConfig”.172178_172178.pngpastedImage_1.png
  2. The flash erasing in the function “fapp_params_to_flash();    ” is OK before adding “GPIO_DRV_TogglePinOutput(HARDWARE_WATCHDOG);” to the “flash_call_back”.172179_172179.pngpastedImage_2.png
  3. The flash erasing is failed after adding “GPIO_DRV_TogglePinOutput(HARDWARE_WATCHDOG);” to the “flash_call_back”. The CPU always resets and it is caused by the “core lockup”(The bit “LOCKUP” of RCM_SRS1 is set as 1).172182_172182.pngpastedImage_5.png

Can you tell me what is the reason?

 

Remark: The SDK_1.3 is used in my project.

My source code is in the attachment.

Please copy it to C:\Freescale\SDK_1.3_KL36\examples\frdmkl46z.

My project is in the address

C:\Freescale\SDK_1.3_KL36\examples\frdmkl46z\user_apps\FMU_MP_W\iar

 

Original Attachment has been moved to: frdmkl46z.zip

Labels (1)
0 Kudos
1 Reply

325 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Robin,

Can you copy the body of void flash_call_back(void); from flash to internal RAM and execute the api function in internal RAM? I suppose that when you execute the flash_call_back() function, the erasing/programming flash process has not been complete yet, if you execute the flash_call_back(0 function which is saved in the same block as you are ersaing/programming the flash, there is issue.

Pls have a try.

BR

XiangJun Rong

0 Kudos