What is the possible problem that S32K144 CANFD prompt FLEXCAN_MB_TX_BUSY

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

What is the possible problem that S32K144 CANFD prompt FLEXCAN_MB_TX_BUSY

3,121件の閲覧回数
jingfang
Contributor IV

CAN1 and 2 of the analyzer act as send and receive, and the tool can see the information. I use S32K144EVB-Q100 and CANFD analysis meter,S32DS show FLEXCAN_MB_TX_BUSY. Is there anything I can try?

connectconnect

0 件の賞賛
返信
13 返答(返信)

3,113件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@jingfang

 you need to power your board from external 12V DC.

Senlent_0-1662096547252.png

 

0 件の賞賛
返信

3,110件の閲覧回数
jingfang
Contributor IV

Thanks a lot~

I power my board from external 12V DC,but the problem still exist.

Is there anything else I should pay attention to?

 

0 件の賞賛
返信

3,104件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@jingfang

       The pin configuration is wrong and the sending mailbox is not configured, and I also changed the clock configuration

.Pins.

Senlent_1-1662101567274.png

.PE Clock.

Senlent_2-1662101619405.png

.TX Message Box

Senlent_3-1662101672090.png

 

.test result.

Senlent_5-1662101799782.png

 

0 件の賞賛
返信

3,094件の閲覧回数
jingfang
Contributor IV

Thanks a lot~ I changed the settings just like you,

but running to: FLEXCAN_DRV_Send -> FLEXCAN_StartSendData :

if (state->mbs[mb_idx].state != FLEXCAN_MB_IDLE)
{
return STATUS_BUSY;
}

not running FLEXCAN_SetTxMsgBuff.

Can you give me the code that you can run?

 

0 件の賞賛
返信

3,082件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@jingfang

be sure external 12V DC was used and don't forgot to change the jumpers in the picture below.

Senlent_0-1662343064690.png

 

0 件の賞賛
返信

3,079件の閲覧回数
jingfang
Contributor IV

Thanks a lot~

I still prompt Tx busy with your demo code.

Wiring as shown below:

9689ed79-959c-48c3-aa6b-5244d9f9c18a.jpg

0 件の賞賛
返信

3,076件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@jingfang

我又测试了一遍,我觉得代码不可能有问题,因为我这边工作正常,你再检查下你的CAN工具设置和连线吧,我用的是PCAN.

Senlent_0-1662363044862.png

你可以跑一下自带的demo,FlexCAN Encrypted这个demo,简单修改下可以测试下你的硬件通路,这个例程我也可以正常跑。

 

 

0 件の賞賛
返信

3,062件の閲覧回数
jingfang
Contributor IV

感谢~我使用flexcan_encrypted_s32k144:卡死在:

while(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, RX_MAILBOX) == STATUS_BUSY);

state->mbs[mb_idx].state  在FLEXCAN_DRV_Receive->FLEXCAN_StartRxMessageBufferData->里面= FLEXCAN_MB_RX_BUSY。

只有在结果不成功的时候才会变成IDLE,我的是成功的,这样有问题?

if (result != STATUS_SUCCESS)
{
state->mbs[mb_idx].state = FLEXCAN_MB_IDLE;
}

修改哪边,可以看硬件通路?

0 件の賞賛
返信

3,059件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@jingfang

你写个简单的只发送不接收的例程,不使用CAN FD,如果能够正常看到数据说明硬件连接没问题,再使用我提供给你的例程,如果不能看到数据,说明你CAN工具链设置有问题,CAN FD需要工具链进行简单的设置。

参考这个demo,删一删就能用

https://community.nxp.com/t5/S32K/S32K146-CAN-Interrupt-support/m-p/1517571/highlight/false#M17556 

0 件の賞賛
返信

3,005件の閲覧回数
jingfang
Contributor IV

帮忙看看附件的普通CAN,是否设置OK?

看起来第一笔指令是有发,但是还是没看到信息,然后一直就busy。

 

0 件の賞賛
返信

2,999件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@jingfang

我这里测试正常

Senlent_0-1663063185683.png

 

0 件の賞賛
返信

2,965件の閲覧回数
jingfang
Contributor IV

我这边量了一下 TP24,RST,一会儿high,一会儿low,一直重启,SCS是always高,看起来SPI都没有通讯,是不是有什么要先设定一下?

0 件の賞賛
返信

2,962件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@jingfang

你是不是跑过UJA1169相关的例程,恢复UJA1169至出厂设置的方法:

file:///C:/NXP/S32DS_ARM_v2.2/S32DS/software/S32SDK_S32K1xx_RTM_3.0.0/doc/html_S32K144/can_pal_s32k144_group.html

Those lines must be modulated using a transceiver, if it is not specified the boards already include the CAN transceiver The CAN transceiver should be in Forced Normal Mode operation (default mode). To reset the CAN transceiver to default mode connect the SBC transceiver in next configuration with the board S32K144EVB-Q100 power off : • pin RSTN from SBC is held LOW • CANH(J13.1) is pulled up to VBAT(J11.2) • CANL(J13.2) is pulled down to GND(J13.4) Power on the board with external supply 12V (J16)

 

0 件の賞賛
返信