How to configure the CAN transceiver on the UJA1169 on the S32K144EVB Q100? Is there a CAN transceiver sample project that can be used directly?
Thank you anyway. I have solved the problem. After changing the clock configuration of Normal Run in the official example named flexcan_encrypted_s32k144 to Option 2 on page 541 of the Reference Manual, the program runs normally on the S32K144EVB Q100 development board.
In SDK which is delivered with Design Studio we have driver for this SBC devices and one example.
Another possibility is to use SBC as it is. By default SBC is in forced normal mode and CAN transceiver is enabled.
Please keep in mind that UJA1169 works only if you power the board at 12V.
Thank you for your answer.
I have tried two examples in the SDK: flexcan_encrypted_s32k144 and can_pal_s32k144. And I also tried two ways to use UJA1169: one is to restore the SBC to the factory default according to the UJA1169 data sheet; one is to transplant the SBC configuration code of sbc_uja1169_s32k144 in the SDK to the two projects mentioned earlier ( Portability changes to clock and pin configuration).When using the first method of use, I measured the CAN_HI and CAN_LO pins on the EVB that didn't pick anything up. Their level was 0V (I measured the two pins on the CAN transceiver of the discrete component, As long as the transceiver is normally powered, the level of these two pins is 2V~3V).When using the second usage mode, configure SBC with SBC_UJA_CAN_CMC_ACMODE_DD. When the program was running, I measured the CAN_HI and CAN_LO pins on the EVB that didn't pick anything up. Their levels were around 2.5V. At this point, I originally thought that the CAN transceiver was active. But when I press SW2 or SW3, there is still no message sent. Then I add SBC_GetCanStatus(&transStatus) to the main program to read cts (CAN transceiver status). The breakpoint is hit one line after SBC_GetCanStatus, and the value of cts when running here is SBC_UJA_TRANS_STAT_CTS_INACT.When using the above two CAN examples, since I only have one S32K144EVB Q100, I connected the EVB to the PC using PCAN. I think this should be no problem.
During this time I also tried to configure the SBC pin wake-up and CAN arbitrary frame wake-up, both can be enabled and disabled.
The above experiments were all done with 12V power.I don't know if I am not configured correctly, or there is a problem with UJA1169 on my EVB.I have no idea, I hope you can help me. Thank you.
To be sure that FlexCan works fine please check PE5 and PE4. Can you see CAN signals there?
Can you share your project to check it on my side?
There are four projects in the WinRAR file, two of which I have modified.My modified project called sbc_uja1169_s32k144 can make PTE5 generate waveforms, while PTE4 is always 5V. Another project I modified called demo19021301 keeps PTE5 at 5V and keeps PTE4 at 0V.The remaining two projects are examples in S32SDK_S32K14x_RTM_2.0.0. When running these two examples, pressing SW3 or SW2 does not see a PTE5 fluctuating signal in the oscilloscope. The signal is not visible after the SBC is restored to the factory defaults according to the instructions in the UJA1169 data sheet.
May I ask you to give a routine to send traditional CAN messages after powering up the S32K144?
Retrieving data ...