LPC55S69 trustzone example flash init hardfault

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

LPC55S69 trustzone example flash init hardfault

ソリューションへジャンプ
1,585件の閲覧回数
idtmdwo
Contributor I

Hello.
I am going to do flash write/read by referring to the flashiap example code in the trustzone example code.
But VERSION1_FLASH_API_TREE->flash_init(config);
In this part, it falls into a hard fault.
May I know what could be the cause?

1.png2.png3.png

0 件の賞賛
返信
1 解決策
1,578件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi idtmdwo

VERSION_FLASH_API_TREE is at boot rom address 0x1301fe00.

According to UM, the user's TrstZone configuration data must allow ROM code execution for successful transition from secure to normal mode and jump to user application. Thus some settings are necessary.

ZhangJennie_0-1625215200138.png

So to fix the error,

1. in Security access configuration window, set related security level as below:

ZhangJennie_1-1625215450720.png

2. When operate Flash and other related peripherals in secure world, make sure the related peripherals are S-Priv. In your application, SYSCTRL and FLASH are used, we need to set both of them as S-Priv.

ZhangJennie_4-1625215667880.png

 

ZhangJennie_2-1625215643914.png

 

ZhangJennie_3-1625215651997.png

After above setting, update code. Your Flash code should be able to work.

 

Best Regards

Jun Zhang

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,579件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi idtmdwo

VERSION_FLASH_API_TREE is at boot rom address 0x1301fe00.

According to UM, the user's TrstZone configuration data must allow ROM code execution for successful transition from secure to normal mode and jump to user application. Thus some settings are necessary.

ZhangJennie_0-1625215200138.png

So to fix the error,

1. in Security access configuration window, set related security level as below:

ZhangJennie_1-1625215450720.png

2. When operate Flash and other related peripherals in secure world, make sure the related peripherals are S-Priv. In your application, SYSCTRL and FLASH are used, we need to set both of them as S-Priv.

ZhangJennie_4-1625215667880.png

 

ZhangJennie_2-1625215643914.png

 

ZhangJennie_3-1625215651997.png

After above setting, update code. Your Flash code should be able to work.

 

Best Regards

Jun Zhang

 

0 件の賞賛
返信
1,571件の閲覧回数
idtmdwo
Contributor I

The problem has been resolved.
Thank you so much for your detailed, easy-to-follow answer.

0 件の賞賛
返信
1,569件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Good to know.

You are welcome!

Best Regards

Jun Zhang

0 件の賞賛
返信