LLCE CAN test failed and felt into HardFault_Handler()

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LLCE CAN test failed and felt into HardFault_Handler()

跳至解决方案
1,272 次查看
harry_choi
Contributor III

Hello, 

I'm trying to test LLCE CAN with Can_Llce_DS_Can2Can_S32G274A_M7 example on your S32G-VNP-RDB2 board.

Actually there was no problem on your example without any change.

But I wanted to test only CAN not CAN FD, so I blocked all and just put below codes in the for loop in the Can_Driver_Sample_Test() function.

CanMessage.length = CAN_STD_FRAME_LEN;
CanMessage.sdu = can_std_data;
CanMessage.id = 1;

can_retval = Can_43_LLCE_Write(CanHO_Config1_TX1, &CanMessage);

With this change, first trial to send was successful but there was no CAN transmit from second trial and the software felt into HardFault_Handler() exception after some trials.

Could you advise what should I do to test CAN Tx/Rx only not CAN FD?

Thanks,

Harry

 

0 项奖励
1 解答
1,247 次查看
bpe
NXP Employee
NXP Employee

In principle, there is nothing wrong in your initializations. The hard faults
you are observing are most likely because you removed something that the
rest of the code expects. You have to debug it to identify the root cause.
CAN2CAN is a relatively complex demo. If you just want to see how to initiate
a non-FD LLCE CAN transmission, a good alternative is
sample_app_llce\llce_sample_app_af\sample_app_can_customization\src\main.c
Although that demo implies the presence of FDK, it is more compact and
useful as a reference even without it.

 

Best Regards,
Platon

 

在原帖中查看解决方案

0 项奖励
1 回复
1,248 次查看
bpe
NXP Employee
NXP Employee

In principle, there is nothing wrong in your initializations. The hard faults
you are observing are most likely because you removed something that the
rest of the code expects. You have to debug it to identify the root cause.
CAN2CAN is a relatively complex demo. If you just want to see how to initiate
a non-FD LLCE CAN transmission, a good alternative is
sample_app_llce\llce_sample_app_af\sample_app_can_customization\src\main.c
Although that demo implies the presence of FDK, it is more compact and
useful as a reference even without it.

 

Best Regards,
Platon

 

0 项奖励