Hard Fault i.MXRT1052

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

Hard Fault i.MXRT1052

Jump to solution
1,481 Views
rubensjunior
Contributor IV

Dear friends,

I am trying configure a sample project of SDK (i.MXRT1052). I am with a Hard Fault (below console message). Please I need help!

Thanks a lot! Have a greate day!

pastedImage_1.png

1 Solution
1,274 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Rubens Junior

As far as I know, you are using the SEMC driver example, am I right? this demo makes use of the SDRAM memory, so when you change the clock settings of the SEMC, it gives you a hardfault. If you want to use the SDRAM for the heap memory, you have to skip the change of clocks and you need to add the DCD, please check the following post:

https://community.nxp.com/message/1214651 

Hope this could clarify your question

Best regards

Jorge Alcala

View solution in original post

7 Replies
1,274 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hello,

Hi Rubens Junior

Could you please share more information about the problem that you are facing? For example:

  • Which version of MCUXpresso IDE are you using?
  • What example code of the SDK are you using?
  • Did you modify jumper settings or the software of the example?

This way we can have a better idea of what is causing this problem.


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

-------------------------------------------------------------------------------

1,274 Views
rubensjunior
Contributor IV

jorgeantonioalcala‌ and friends,

Below is the features of my project:

  • Which version of MCUXpresso IDE are you using?

      MCUXpresso IDE v10.3.1 [Build 2233] [2019-02-20]

  • What example code of the SDK are you using?

      evkbimxrt1050_semc

  • Did you modify jumper settings or the software of the example?

      No

In addition, I am try manipulated the heap alocation. Actualy, the heap is alocated in the internal RAM, but I need alocate the heap in the external RAM (BOARD_SDRAM - Size 32MB). 

I did set below and the project buil with success, however occurs the hardfault above.

Please, I ask your colaboration.

Best Regards!

Rubens Júnior

0 Kudos
1,274 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Rubens Junior

How are you changing the semc example? when you mentioned that you are modifying the heap allocation, are you using the manger linker option from the MCUXpresso? Unfortunately, a hardfault can be happening due to many reasons, so if possible, please try to be more detailed in the process that you are following before you get the hardfault.

Best regards

Jorge Alcala

1,274 Views
rubensjunior
Contributor IV

Hi jorgeantonioalcala‌,

Thank you very much for your attention!

Follow my answers:

How are you changing the semc example?

I just changed the heap allocation.

when you mentioned that you are modifying the heap allocation, are you using the manger linker option from the MCUXpresso?

Yes, I am using the manager linker option as the below print.

Unfortunately, a hardfault can be happening due to many reasons, so if possible, please try to be more detailed in the process that you are following before you get the hardfault.

I just made the heap allocation modification.

 

Let me know what I can do.

Thanks a lot!

Rubens Júnior

0 Kudos
1,274 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Rubens Junior

Could you specify what change did you make in the heap allocation?

It is something related with the SDRAM, if there isn't enough memry for the heap, it could give a hardfault if the memory management is not performed correctly, for example with a RTOS system.

Regards

Jorge Alcala

1,274 Views
rubensjunior
Contributor IV

Dear jorgeantonioalcala‌,

Thank you very much.

Follow my modification in the heap memory.

pastedImage_1.png

Thanks a lot!

Rubens Júnior

0 Kudos
1,275 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Rubens Junior

As far as I know, you are using the SEMC driver example, am I right? this demo makes use of the SDRAM memory, so when you change the clock settings of the SEMC, it gives you a hardfault. If you want to use the SDRAM for the heap memory, you have to skip the change of clocks and you need to add the DCD, please check the following post:

https://community.nxp.com/message/1214651 

Hope this could clarify your question

Best regards

Jorge Alcala