Basics of Bus Fault in S32DS Program

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

Basics of Bus Fault in S32DS Program

182 Views
abdul_rahman
Contributor II

Hi team,

I was trying to run a simple complementary program on a S32K358 microcontroller using the S32DS IDE. But i'm facing an error called as bus fault in the program. I have attached the highlighted screenshot of the error message below.

abdul_rahman_0-1722441809041.png

I ran the same program in an S32K344 evaluation board and there I didn't face such an error. Please explain me this fault and also the solution to this as I'm new to this IDE's programming. It would be really helpful.

S32DS-S32PLATFORM #S32K358 #BusFault 

0 Kudos
Reply
5 Replies

13 Views
abdul_rahman
Contributor II

Hi @VaneB 

I ran the Emios_PWM_Ip example code, that comes with the SDK, on my custom board with the S32K358 controller. I'm still getting the same HardFault error mentioned before. What could be the problem then?

abdul_rahman_0-1723023668800.png

 

0 Kudos
Reply

159 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

BusFault: detects memory access errors on instruction fetch, data read/write, interrupt vector fetch, and register stacking (save/restore) on interrupt (entry/exit).

HardFault: is the default exception and can be triggered because of an error during exception
processing, or because an exception cannot be managed by any other exception mechanism.

If there is no handler for a specific fault, it is escalated to HardFault.

As the code works with a S32K344, there could be a configuration problem. If it is possible could you share your project or configurations? Also, which RTD version are you using? 

 

BR, VaneB

148 Views
abdul_rahman
Contributor II

Hi @VaneB 

I have attached the .zip file of the project that the code is in. I'm using version 4.0.0 of PlatformSDK kit from NXP. 

P.S.: Is it necessary to use both Cortex-M7_0_0 (Boot) and Cortex-M7_0_2 files for programming S32K358? Why does the design studio make two files for this processor and only one file for S32K344??

0 Kudos
Reply

105 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

I have flashed your code on my S32K3X8EVB-Q289 and I did not get a bus Fault. Are you using a custom board?

Is it necessary to use both Cortex-M7_0_0 (Boot) and Cortex-M7_0_2 files for programming S32K358? No, depends if you want to work with multicore. 

Why does the design studio create two files for this processor and only one file for S32K344? Because S32K358 devices have 1 LS core and 1 single core and S32K344 devices have only 1 LS core. So one project is created for each device core.

0 Kudos
Reply

34 Views
abdul_rahman
Contributor II

Hi @VaneB 

Yes, you are right. I'm using a custom made board which uses the S32K358. What may the problem then?

0 Kudos
Reply