LPC5528 SRAM3 hardfault

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC5528 SRAM3 hardfault

跳至解决方案
1,537 次查看
alex__
Contributor II

I am trying to write some data for SRAM 3 region, which locates at 0x2003 0000 accroding to User manual.

But this results in hardFault. Any other regions of SRAM work properly.

Here is example of my code: 

 
 
 
 

Аннотация 2020-11-19 135616.jpg

Stack, data and heap placed in SRAM 0, so, region 3 should be free.

Аннотация 2020-11-19 135907.jpg

 

 
 
标记 (2)
0 项奖励
1 解答
1,483 次查看
converse
Senior Contributor V

According to the data sheet, LPC55S28 does not have SRAM3 (which is probably why it was missing in the original project setup).

 

LPC55S28 is a device with total ram of 256k, and such devices do not have SRAM3. See attached screenshots from the data sheet and user manual.

Screenshot 2020-11-25 at 14.59.39.png

Screenshot 2020-11-25 at 15.00.27.png

  

在原帖中查看解决方案

0 项奖励
8 回复数
1,520 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alex,

Have you define the SRAM3 space in memory detail:

2020-11-20_11-15-10.jpg

 

Regards,

Alice

0 项奖励
1,516 次查看
alex__
Contributor II

At default configuration there is no SRAM3 (RAM from 0x2000 0000 to 0x2003 0000 is SRAM 0,1,2 in user manual).

alex___0-1605865205585.png

I have added SRAM3 by increasing size:

Аннотация 2020-11-20 130003.jpg

But nothing changes.

0 项奖励
1,504 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alex,

Please share your whole project, I will help to check it on my side, thanks.

 

Regards,

Alice

0 项奖励
1,488 次查看
alex__
Contributor II

Hello Alice, here it is.

Code with SRAM3, where MCU is hardfaulting, located at the beginning of the main().

0 项奖励
1,476 次查看
alex__
Contributor II

Alice, I think that this issue is resolved and you don't need to check my project.

Thank you.

0 项奖励
1,461 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

OK, thanks!

0 项奖励
1,484 次查看
converse
Senior Contributor V

According to the data sheet, LPC55S28 does not have SRAM3 (which is probably why it was missing in the original project setup).

 

LPC55S28 is a device with total ram of 256k, and such devices do not have SRAM3. See attached screenshots from the data sheet and user manual.

Screenshot 2020-11-25 at 14.59.39.png

Screenshot 2020-11-25 at 15.00.27.png

  

0 项奖励
1,478 次查看
alex__
Contributor II

Yeah, I think you are right. I just thought that usb-ram and ram-x is not included into 256k size.

 

Thank you.

0 项奖励