LPC55Sxx FLASH programming

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC55Sxx FLASH programming

2,775件の閲覧回数
GrzegorzM
Contributor II

Hello,
I have a question regarding the FLASH API, is it possible to program FLASH memory using the API by sending data to address 0x10000000-0x1003DE00?
If so, some additional configuration has to be done?
I ask because I see that the files I can generate in the SDK (lpcxpresso55sXX_secure_gpio_s) have address 0x10000000. And when I try to write them using the FLASH API, the operation ends with an error.

Thanks,
Grzegorz 

ラベル(1)
タグ(1)
0 件の賞賛
返信
9 返答(返信)

2,735件の閲覧回数
GrzegorzM
Contributor II

Hello @Alice_Yang ,
This still didn't answer my question - how to upload my application to address 0x10000000?

Currently writing software for the debugger, it does the following steps:
1. connect to the device via SWD interface
2. upload my firmware to RAM
3. and now I want to write my data-application (which I upload to RAM) to FLASH address 0x10000000 using API. I call the flash_init function first and then flash_program.

Thanks 
Grzegorz 

0 件の賞賛
返信

2,730件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Please share your project,thanks!

 

BR

Alice

0 件の賞賛
返信

2,720件の閲覧回数
GrzegorzM
Contributor II

I cannot share my project.
I can describe exactly which files I use and what I do.
1. I opened two examples "lpcxpresso55S06_secure_gpio_s" and "lpcxpresso55S06_secure_gpio_ns". After building the project, I generated two code files lpcxpresso55S06_secure_gpio_s.hex (address 0x10000 - 0x11080) and lpcxpresso55S06_secure_gpio_ns.hex (address 0x10000000 - 0x10003440).
2. I started my debbugger and connected to the device using SWD interface.
3. I loaded the firmware into RAM. Then I loaded my data into RAM, which I will later put into FLASH memory.
4. I called flash_iniit and flash_program function with address, size of data to write and current location of data in RAM.
5. Uploading to FLASH from API works without any problem for addresses 0x10000 - 0x11080 , that is for non-secure area. When I want to upload with API the application code to address 0x10000000 - 0x10003440, the API returns an error. "Address or length is outside of addressable memory".

How to make API work also for addresses above 0x10000000?
Thanks 
Grzegorz 

0 件の賞賛
返信

2,693件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

You need config the Flash API to secure, detail please refer to:
UM11424 -> Chapter 43: LPC55S0x/LPC550x Trusted Execution Environment 

 

BR

Alice

0 件の賞賛
返信

2,755件の閲覧回数
GrzegorzM
Contributor II

Hi,
Secure code aplication 0x10000000 - 0x10003440.
Non-secure code aplication 0x00010000 - 0x00011080.
I generated the files from the SDK.
Thanks 
Grzegorz 

0 件の賞賛
返信

2,737件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Your application code is from 0x10000000, so flash API can't erase/ program the memory 0x10000000,

try other memory that not used by code.

 

BR

Alice

0 件の賞賛
返信

2,771件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Pay attention , this memory part is secure part.

Do you want to program your image to 0x1000 0000 or just write some data into there by API?

Please describe your detail steps.

 

BR

Alice

0 件の賞賛
返信

2,768件の閲覧回数
GrzegorzM
Contributor II

Hi @Alice_Yang 

I know that this is a secured area.
It wants to upload data using API to address above 0x10000000.
Do I need to configure anything extra?
Does the API disallow writing to an address above 0x10000000?

Thanks
Grzegorz 

0 件の賞賛
返信

2,757件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Where is your image or application code ? Address? 

 

 

 

0 件の賞賛
返信