How to program Flash

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

How to program Flash

900 Views
wangqyfm
Contributor II

I want to program internal Flash (address: 0x10018000 ~ 0x10018200 ), but FLASH_Erase return 102...

The code is running in (or under ?) S-state, I modified it from demo "trustzone_examples\hello_world" in SDK 2.7.1.

Steps:

1. Import trustzone_examples\hello_world into MCUXpresso IDE.

2. Replace 'hello_world_s.c' by 'iap_flash.c', from demo "driver_examples\flashiap".

3. Add "iap1" in Manage SDK components.

4. Compile, OK.

5. Debug code, and FLASH_Erase return 102...

Is there some bugs, or mistake in my code?

Labels (1)
Tags (1)
0 Kudos
3 Replies

785 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Quincy Wang,

Change the address  0x10018000 to 0x00018000, it will work well.

Regards,

Alice

0 Kudos

786 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Quincy Wang,

Please tell me which chip or board,thanks!

Regards,

Alice

0 Kudos

786 Views
wangqyfm
Contributor II

LPC55S69.

And the RTOS is zephyr, build with board: 'lpcxpresso55s69'.

0 Kudos