S21K144 sameple CAN driver can not work

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

S21K144 sameple CAN driver can not work

1,131 Views
julieliu
Contributor I

Hello,

I am nowing work on S32K144 EVB board and trying to make CAN commnication.

First I tried SDK sample project as the first line in the picture.

pastedImage_1.png

But it's does not work so I intergrate UJA1169 SBC driver and call the following code before CAN init.
void SBCInit(void)
{
    LPSPI_DRV_MasterInit(LPSPICOM1, &lpspiCom1State, &lpspiCom1_MasterConfig0);

    /* Initialize SBC */
    SBC_Init(&sbc_uja11691_InitConfig0, LPSPICOM1);
}

But it still can not work.

so dones anyone know how to fix the issue or provide some sample code or solution for me.

Thanks in advance.

Br,

julie'

0 Kudos
4 Replies

792 Views
alexandrunan
NXP Employee
NXP Employee

Hello Julie,

To reset the UJA1169 Transceiver to Default Mode need to follow next procedure:

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 (TP24) from SBC is held LOW, TP24 is located behind External Power supply connector (J16)
• CANH(J13.1) is pulled up to VBAT(J11.2)
• CANL(J13.2) is pulled down to GND(J13.4)
Now Power on the board with external supply 12V (J16) with the connections above in place after power on cycle disconnect the configuration above and connect for normal can communication and should work. 

0 Kudos

792 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Which SDK version do you use? 

Have you tried the flexcan_encrypted_s32k144 example?

Regards,

Daniel

0 Kudos

792 Views
julieliu
Contributor I

Hello Daniel,

Hello Daniel,

 

Thanks for answer me , my version is S32DS.ARM.2018.R1 (C:\NXP\S32DS_ARM_v2018.R1\S32DS\S32SDK_S32K14x_EAR_0.8.6).

 

And I have also tried flexcan_encrypted_s32k144 but there are something wrong with the downloading.

 

Please help answer me the following questions:

  1. Does CAN driver really need SBC driver for communication on EVB board?
  2. Have you ever tried some CAN  sample code and it works on EVB board?

As my task for CAN driver is very near the due date so I hope you can give me some suggestions.

 

Thanks.

 

Julie

0 Kudos

792 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Julie,
Please see the datasheet of the SBC. The UJA1169 SBC is in Forced Normal mode be default and the CAN transceiver is active in that mode. So, it should work without any initialization.

Yes, I have tried the examples, it works.
How do you supply the board? The SBC needs 12V.
What exactly doesn’t work? Have you measured CAN_TX pin?

Regards,
Daniel

0 Kudos