S32K148 CAN message transmited with CANoe failed

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

S32K148 CAN message transmited with CANoe failed

803 Views
Leon06
Contributor III

Hi all,

I have some problems about the CAN transmited.

I am using CANoe to transmit CAN message with our own designed board, but the CAN module keeping going to ISR.

Spoiler
void CAN2_Error_IRQHandler(void)
{
    FLEXCAN_Error_IRQHandler(2U);
}

also the register ESR1 = 0x242252

Leon06_1-1676366240581.png

and CANoe responsed message

System 821.950000: CAN 1 : Message with ID = 1 could not be sent. Driver error 11 in TransmitCANFrame

Leon06_0-1676366031665.png

The CAN message keeping non-ACK and retry again and again

Leon06_2-1676366445623.png

If I power-on then power-off the board and the CANoe keeping starting, and the issue stiil exists. How can I fix this issue?

Leon

 

 

 

 

 

Tags (1)
0 Kudos
3 Replies

786 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Leon06

Can you provide your simplified project and I will reproduce your problem.

PS:please tell me which IDE and SDK version you're using.

0 Kudos

774 Views
Leon06
Contributor III

Hi Selent,

I'm using the SDK 4.0.3, S32DS Ver 3.4, and below is the flexcan setting.

 

#include "canCom0.h"

flexcan_state_t canCom0_State;

const flexcan_user_config_t canCom0_InitConfig0 = {

.fd_enable = false,
.pe_clock = FLEXCAN_CLK_SOURCE_PERIPH,
.max_num_mb = 32,
.num_id_filters = FLEXCAN_RX_FIFO_ID_FILTERS_8,
.is_rx_fifo_needed = false,
.flexcanMode = FLEXCAN_NORMAL_MODE,
.payload = FLEXCAN_PAYLOAD_SIZE_8,
.bitrate = {
.propSeg = 7,
.phaseSeg1 = 4,
.phaseSeg2 = 1,
.preDivider = 13,
.rJumpwidth = 1

},
.bitrate_cbt = {
.propSeg = 7,
.phaseSeg1 = 4,
.phaseSeg2 = 1,
.preDivider = 13,
.rJumpwidth = 1
},
.transfer_type = FLEXCAN_RXFIFO_USING_INTERRUPTS,
.rxFifoDMAChannel = 0U
};

 

I am using CANoe to feed the CAN meassge, and the CAN messages responsed NACK. Once the CAN message was not sent success, so kept re-sending CAN message per 50us.

Leon06_0-1676531936769.png

If I want to make the flexcan module worked normally again, what's the setting should be changed.

Leon

0 Kudos

767 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Leon06

Thanks for the info, but this is not a whole project
There should be no problem with the configuration of FlexCAN. Maybe it has something to do with your sending and receiving settings.

Here is a routine based on S32K142.

https://community.nxp.com/t5/S32K-Knowledge-Base/S32K1xx-FlexCAN-Mask-Setting-Demo/ta-p/1519753 

0 Kudos