hardfault handler error while debugging

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

hardfault handler error while debugging

14,635 Views
Anjalipurushothaman
Contributor III
 
0 Kudos
Reply
21 Replies

13,555 Views
amitra
Contributor I

Hi @VaneB ,

There is a hard fault handler error while running the same example code. 
Having same issues with same configuration.
Please advise.

0 Kudos
Reply

14,518 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

Did you make any modifications to the example code?

I am not able to replicate your issue. Also, the S32K3X8EVB-Q289 is still not available for the mass market. I tested the example in the S32K3X4EVB.

 

B.R.

VaneB

0 Kudos
Reply

14,441 Views
Anjalipurushothaman
Contributor III
I haven't made any changes to the code other than the syntax errors which popped up (missing semicolon,..).
 
Please find the below project example used and steps followed. 
 

Development board- s32k3x8evb-Q289

IDE - s32DS for s32 platform 
Debugger Used - PE Micro Debugger
Example project from s32k3xx (Port Example - Siul2_Port_Ip_S32K358) (mentioned in the description that supported board as x32k3x8cvb-q289)
 
*File -New -project from example - port example-finish
*From the Project explorer window, selected the project name - Right click- configuration tool-Under Drivers added Mcu, Port, Dio.
*Click on Update code 
*Build Project
*Under Debug configuration-Selected the devices - Debug.
To build and run the example application, generated configurations needed at the Configuration Tool menu then clicked on the desired configuration tool (Pins, Cocks, or Peripherals). Made the desired changes then clicked on the Update Code button. and then select the configuration to be built and finally debug the project.
These are the steps followed, Please go through and let me know if anything wrong in these.
0 Kudos
Reply

14,332 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

Could you share your project? Also, are you using the S32K3 Real-Time Drivers Version 3.0.0, released on March 31, 2023?

 

0 Kudos
Reply

14,288 Views
Anjalipurushothaman
Contributor III

Please find the attached program used from the S32K3rtd example projects.

(S32K358 Real-Time Drivers Version 3.0.0 CD03 ) is the RTD used.

0 Kudos
Reply

14,268 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

Could you help me to test the example with a more recent release of the S32K3 Real-Time Drivers Version 3.0.0 (released on March 31, 2023, or onwards)?

0 Kudos
Reply

14,226 Views
Anjalipurushothaman
Contributor III

Sure, I have donwloded the (SW32K3_RTD_4.4_3.0.0_P01_HF01_D2304.exe file).

how to replace this RTD version with the previosuly donwloded version?

After the download, do I need to follow any steps to update it on the s32Dstudio IDE?

0 Kudos
Reply

14,178 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

To uninstall any packages on S32DS, go to the Help tab -> Installation Details. Once you select the RTD version, at the bottom of the Installation Details window, there is an Uninstall.. option. 

To install the new RTD version, first download the updatesite.zip file and follow the instructions of S32DS Extensions & Updates: Explanation and How To Use.

0 Kudos
Reply

14,130 Views
Anjalipurushothaman
Contributor III

Please find the installation made offline (S32K3 Realtime Drivers version 3.0.0 P01)Image attached.

while hitting the build project option from the project explorer getting error message as attached. Tried with other versions as well stating that partivular sdk is not supported.

 

0 Kudos
Reply

14,085 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

Did you install the Development Package with support for S32K3xx devices for S32DS v.3.5? If not you can download it from S32K3 Standard Software -> Automotive SW - S32K3 - S32 Design Studio -> S32 Design Studio 3.5.0 Development Package with support for S32K3xx devices (released on March 31, 2023).

0 Kudos
Reply

14,027 Views
Anjalipurushothaman
Contributor III

Yes, I been using the same sdk specific to s32k3xx devices (Please find the attached RTD and sdk installed from s32DS Extensions and updates).Now while hitting the debug option , it's not entering into any hardfault (please find the attached Debugger console).

 

As the specific sample program refers to the toggling of LED, inorder to see the toggling while hitting run configuration, the options to choose are c/c++application/eclipse/GDB Segger. so what are the steps involved inorder to flash this code into the evaluation board to see the toggling.(I have attached the run configuration tab, pin configurations made for the code). 

what are the modifications needed on this ?

0 Kudos
Reply

14,011 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

Firstly, the board you are using is still not a mass-market product. So, the example probably is not correctly routed. Please verify with the schematic of your board that the configured pin is the one connected to the LED. 

Also, you mentioned that you used the Run option, please try using the Debug option and the configuration to be built is FLASH (Debug_FLASH).

0 Kudos
Reply

13,802 Views
Anjalipurushothaman
Contributor III

As per the schematic, the changes have been made in the configuration tab. Specific to the LED D33, the pin allocation and the changes made on the code are attached. Stil the led not blinking.

As i have stated earlier , run configuration tab and the avilable options showing is only these, out of that which option has to be selected to flash the code on to the board? (Please find the attached jpg file named "Run configuration options").

Also if i have slected debug configuration option (FLASH (Debug_FLASH).) how can I analyse the code is running ? how can i able to know the LED blink as the debug configuration make the code to pause at each instance?

0 Kudos
Reply

13,787 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

You are still selecting the Run Configurations instated of Debug Configurations. Please use the option shown in the attached images. 

VaneB_0-1692739624297.png

VaneB_1-1692739694620.png

Also, the example code configures the pin using a label to identify it. I suggest configuring the corresponding LED pin as it was by default. If you put a label in the pin configuration, Config Tools generate two defines in Siul2_Port_Ip_Cfg.h file, these are the ones that you can use in Siul2_Dio_Ip_ReadPin(). 

VaneB_2-1692740172334.png

VaneB_3-1692740211797.png

 

 

 

 

0 Kudos
Reply

13,753 Views
Anjalipurushothaman
Contributor III

I have tried using the debug configuration option, but my query is if I have slected debug configuration option (FLASH (Debug_FLASH).) how can I analyse the code is running ? how can i able to know the LED blink ? Because the debug configuration make the code to pause at each instance right?

 

 

0 Kudos
Reply

13,697 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

To learn how works Debug in S32DS, please refer to the section named Debugging a project of the S32 Design Studio for S32 Platform 3.5 User Guide that you can find at C:\nxp\S32DS.3.5\S32DS\help\pdf\S32DS_User_Guide.pdf

0 Kudos
Reply

13,656 Views
Anjalipurushothaman
Contributor III

As per the earlier conversation, making the default pin configurations (PTG30 , F5 , GPIO 222) Please find the attached eerors after the build. 

0 Kudos
Reply

13,541 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

When you create the project from an example, did you click Update Code at Config Tools?

Also, if you put a label in the pin configuration, generate two definitions that can be used in the functions. 

VaneB_1-1693258272806.png

VaneB_0-1693258216122.png

 

0 Kudos
Reply

13,497 Views
Anjalipurushothaman
Contributor III

Still the hard fault error is showing, while resuming the debug session the code enters into hard fault .

How to fix this issue?

 

 

0 Kudos
Reply

13,455 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Anjalipurushothaman 

From the image you shared, I can see that the problem is caused because of the clocks. Please make sure that the configurations are correct and also verify if the hardware is not damaged. 

The S32K35x8EVB is not a mass-market device, I am not able to check or verify any information due to the security level when working with automotive parts such as this. Could you please contact the person who provided you with the device for further support on this part?

0 Kudos
Reply