s32k312 can error passive

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

s32k312 can error passive

1,429件の閲覧回数
coo
Contributor I

messageImage_1708653257397.jpg

I want to use CAN 0-5 channel using s32ds 3.4 RTD 2.0.3 version.

The picture below is an error phenomenon as seen by Pcan view.
Data is transmitted and received on all CAN channels, but error passing occurs at irregular intervals.
I am sending and receiving CAN TX RX in 100ms.


I think the cause of this is in the process of controlling the controller.

void v_canCh0ControllerMode(void)
{
static uint8_t u8_canCh0ControllerStart = 0U;
 
if(0U == u8_canCh0ControllerStart)
{
Can_SetControllerMode(0, CAN_CS_STARTED);
u8_canCh0ControllerStart = 1U;
}
else
{
if(TRUE == b_canCh0TxFlag)
{
Can_SetControllerMode(0, CAN_CS_STOPPED);
b_canCh0TxFlag = FALSE;
u8_canTxStart[0] = 0U;
u8_canCh0ControllerStart = 0U;
}
}
}
 
After declaring b_canCh0TxFlag as FALSE, it is changed to TRUE when the transmission is completed.
No controller control was created for reception.

I controlled the controller as above, but do I have to do CAN_CS_STARTED and do CAN_CS_STOPPED so that the next transmission and reception can come in? 
 
0 件の賞賛
返信
3 返答(返信)

1,399件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you need not to stop controller between transmission/reception.
Try to check CAN bit timing if it is set similarly on both sides, means same bitrate and sample point. If PE clock is selected to be running from FIRC, select rather FXOSC.

BR, Petr

0 件の賞賛
返信

1,392件の閲覧回数
coo
Contributor I

@PetrS
I changed the CLOCK from FIRC to FXOSC, but I still get an Error Passive error.
The bit rate and sample point are set to 500 and 87.5.
If you don't need to stop the controller between transmitting and receiving, do you mean that you can do TX and RX every 100ms without having to do CAN_CS_STOPPED after you first do Can_SetControllerMode(0, CAN_CS_STARTED)?

I want to use all channels, but does this apply to all channels?

0 件の賞賛
返信

1,385件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes you can do TX and RX every 100ms without stopping module.

BR, Petr

0 件の賞賛
返信