I Get Hardfault On Custm Board

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

I Get Hardfault On Custm Board

Jump to solution
1,453 Views
omerkaanbasakin
Contributor IV

Hello ı am using Mcuxpresso 11.1.1  and MIMXRT 1052 on custom board. Sdk: SDK_2.7.0_MIMXRT1052xxxxB. I tried to modify sdcard_fatfs example and it worked but when ı create a new project and tried the same code ı get hardfault. I did not understand what ı was missing or wrong.pastedImage_1.png

Labels (1)
0 Kudos
1 Solution
1,204 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Omer Kaan Basakinci 

  When you use your own created project, can you enter the main code, then run it enter the hard fault, or when you enter the debug mode, it enters the hard fault?

  Do you try to create one simple project, eg, led_blinky project, whether it enters the hard fault or not?

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

5 Replies
1,205 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Omer Kaan Basakinci 

  When you use your own created project, can you enter the main code, then run it enter the hard fault, or when you enter the debug mode, it enters the hard fault?

  Do you try to create one simple project, eg, led_blinky project, whether it enters the hard fault or not?

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,203 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Omer Kaan Basakinci ,

  Perfect, thanks to let me know you already find the root problem and solve it.

  So, if your question is solved, please help me to mark the correct answer, just to close this case.

  If you have any new questions in the future, welcome to create the new question post.

Best Regards,

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,204 Views
narenchandra401
Contributor III

Hi Kerry ,

We are also facing the same issue ,

In our case we used EVK IMXRT1020 for development and now we had this custom board fabricated , when we are trying to flash the basic SDK examples like led blinky , gpio output , it is going into Hard fault .

If we debug the exectuion is traced till the last state of while for one iteration , when the second iteration starts it is entering hard fault with error " Instruction bus error"

We are using MCUXpresso and PE Micro jtag for flashing the code .

I have already described the same in this thread , please help us figured out what could be the problem ,

omerkaanbasakinci@gmail.com‌ if your issue is solved , please let us know what did you do to get that solved as it looks we both are facing the similar issue .

Here is the link to the other thread 

https://community.nxp.com/thread/536860 

Regards,

Naren 

0 Kudos
1,204 Views
omerkaanbasakin
Contributor IV

Hi narenchandra40185@gmail.com

The error I encountered was the result of trying to use baremetal codes with freertos. We also use pemicro. Try to debug from the pemicro interface. Make sure the correct driver is selected, you may need to change the flash configuration  code. We chose the target device as 1052 qspi and you can download a folder named supportFiles_ARM from pemicro web site. May be it helps.

Kind Regards.

0 Kudos
1,204 Views
omerkaanbasakin
Contributor IV

Hi kerryzhou

Thanks for your reply, 

I made a big mistake . I add freerttos  adapter of sdmmc codes and use sdmmc interrupt codes. This mistake causes hardfault, Now ı use fatfs freertos and it work well. 

Kind Regards.

0 Kudos