S32K3 HardFault Error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K3 HardFault Error

ソリューションへジャンプ
7,950件の閲覧回数
kranthi
Contributor I

Hi, 

I am working on S32K3x4EVB_Q257 Evalboard. I have imported the example programs(CAN, UART and I2C) from RTD_4.4_1.0.0 drivers. when I am trying to debug, the execution is going to HardFault handler from Clock_Ip_DistributePll() function in Clock_ip.c file.

Below are the steps followed to import and the build

  1. File->New->S32DS Project From Example.
  2. S32 Configuration Tool.
  3. Update code.
  4. Build project.
  5. Debug(Flash).

Apart from these steps do I need to configure anything for clocks/peripherals on hardware/software?

 

Thank you

 

Regards

Kranthi

0 件の賞賛
返信
1 解決策
7,908件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @kranthi,

Turned out the interrupt handlers haven't been installed yet. Please add these lines after PlatformInit(NULL_PTR):

Platform_InstallIrqHandler(FLEXIO_IRQn, &MCL_FLEXIO_ISR, NULL_PTR);
Platform_InstallIrqHandler(LPUART3_IRQn, &LPUART_UART_IP_3_IRQHandler, NULL_PTR);
 
MicrosoftTeams-image (4).png
 
After adding these, I can run the example normally.
 
Best Regards,
Nam

元の投稿で解決策を見る

0 件の賞賛
返信
14 返答(返信)
7,939件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @kranthi,

Please try to compile it in Debug_RAM as specified in the description file and run it also in Debug_RAM configuration.

Best Regards,

Nam

0 件の賞賛
返信
7,926件の閲覧回数
kranthi
Contributor I

Hi @namnguyenviet 

Thank you for the quick response. I have tried the the UART example by compiling in Debug_RAM and run it with same. The pll clock and HardFault issues was resolved, but the execution going to undefined _handler from the Uart_AsyncSend().

I made the hardware connections(S32K3X4EVB-Q257) as mentioned in the description

PTA0(J352.22) - PTD3(J352.10)

PTA1(J352.19) - PTD2(J352.7)

did i miss anything?

 

Thank you

Regards

Kranthi

 

0 件の賞賛
返信
7,909件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @kranthi,

Turned out the interrupt handlers haven't been installed yet. Please add these lines after PlatformInit(NULL_PTR):

Platform_InstallIrqHandler(FLEXIO_IRQn, &MCL_FLEXIO_ISR, NULL_PTR);
Platform_InstallIrqHandler(LPUART3_IRQn, &LPUART_UART_IP_3_IRQHandler, NULL_PTR);
 
MicrosoftTeams-image (4).png
 
After adding these, I can run the example normally.
 
Best Regards,
Nam
0 件の賞賛
返信
7,879件の閲覧回数
kranthi
Contributor I

Hi @namnguyenviet 

 

Thank you for the support. yes, after adding the two interrupt handler lines the application is working fine. But if we want to Debug in Debug_Flash mode what we need to configure/change?

What is the issue? How to resolve it?

Thank you & Regards

Kranthi

0 件の賞賛
返信
7,867件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @kranthi,

The issue is from the RTD driver itself. It will be fixed in the RTM 1.0.0 release (please note that your current version is RTM 1.0.0 Code Drop 01, which is a pre-release version, and it will be replaced by RTM 1.0.0). In the meantime, please try out with Debug_RAM only.

Best Regards,

Nam

0 件の賞賛
返信
7,626件の閲覧回数
Venkatesh_Vedula
Contributor I

Hi @namnguyenviet ,

I'm facing issue after updating RTD drivers in S32DS which you have released on 07-oct-2021. After importing an example code into project, I used to update the code in .mex file. But post update, I'm getting some errors in Drivers as well as in MCAL drivers. Some of the errors I'm posting here.

Errors:

Issue: Mcu not found in the toolchain/IDE project. Project will not compile!

Issue: mcl not found in the toolchain/IDE project. Project will not compile!

Issue: port not found in the toolchain/IDE project. Project will not compile!

Issue: Platform not found in the toolchain/IDE project. Project will not compile!

And also I'm unable to see RTD source folder in the project which was automatically added after importing the project in the previous version.

Thank you,

Venkatesh

0 件の賞賛
返信
7,829件の閲覧回数
Anil_Kumar_M
Contributor I

Hi,

@namnguyenviet  Thank you for all the support

Can please Update us That, when can we expect the  RTM 1.0.0 release, Also We have tried Normal_Can_Example  and Flex_CAN_Example on S32K344 in Debug RAM Mode, In Normal, Can Example we are facing PLL_Clock Issue, So can you please suggest us the solution for the current problems we are facing.

Thanks Again!

Best Regards,

Anil Kumar M

0 件の賞賛
返信
7,810件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @Anil_Kumar_M,

The RTD 1.0.0 is supposed to be delivered on 7-Oct. About the example's issue, what do you mean by normal CAN? Is that the Can_Example_S32K344 and FlexCAN_Ip_Example_S32K344? And both of them have the same issue with PLL clock? 

Best Regards,

Nam

0 件の賞賛
返信
7,808件の閲覧回数
Anil_Kumar_M
Contributor I

@namnguyenviet  Yes, We are Facing the PLL issue in  Can_Example_S32K344.

 

Best Regards,

Anil Kumar M 

0 件の賞賛
返信
7,790件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @Anil_Kumar_M,

The clock was setting incorrectly in both of the two examples. Please update the clock tree for both of the example as below:

ClockTree.png

 

 

 

 

 

Also, in the Can_Example_S32K344, the configuration set was incorrect, it should be pre-compile:

PreCompile.png

After update above things, I can run the example successfully.

Best Regards,

Nam

0 件の賞賛
返信
7,737件の閲覧回数
kranthi
Contributor I

Hi @namnguyenviet 

I am working on FlexCAN_Ip_Example_S32K344 example. After setting the clock the application is working fine. Thank you for the support.

But I am trying to configure the CAN to interface with CAN simulator. for that I have modified the FlexCAN operation mode from loop-back mode to Normal mode or user mode IP FlexCAN driver.

And also configured the CAN Tx and RX pins.

After these configurations I am able to see the signal toggling on Tx pin while sending data. But I am unable to see the data at CAN transceiver IC out (CAN_H and CAN_L).

I have configured CAN transceiver pins as below

EN - High

STB - High

Do I need configure anything?

 

Thank you & Regards

Kranthi 

0 件の賞賛
返信
7,714件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello @kranthi,

It's a little bit tricky if you are using the CAN transceivers soldered in the EVB board - TJA1153, because these transceivers needs the pre-configuration before starting the communication. I recommend to download the TJA1153 datasheet first to have a glance of how it works. You can request for that document via your local sales representatives (that document might need a NDA contract), and unfortunately I couldn't share it in public.

Best Regards,

Nam

0 件の賞賛
返信
7,711件の閲覧回数
kranthi
Contributor I

Hi @namnguyenviet 

 

Sure we will contact for the datasheet and we will go through the configuration. Thank you.

 

Regards

Kranthi

0 件の賞賛
返信
7,858件の閲覧回数
kranthi
Contributor I

Hi @namnguyenviet 

 

Thank you for the support and clarifications.

 

Regards

Kranthi

0 件の賞賛
返信