Hello everyone,
I have two codes using CAN0 and CAN1, the first code using RTD (S32K3_RTD_2_0_1_D2207_ASR_REL_4_4_REV_0000_20220707) both channels are working properly with this configuration on S32DS:
When I configure the same baudrate on EB Tresos 29.0, only the CAN0 is working, the CAN1 is returning error on BUSMASTER tool:
This is the configuration on Tresos for CAN0 and CAN1:
This is the code that I`m using for test:
When I select the instance 0, I can see the message reaching the BUSMASTER correctly:
Note: The transceiver is being configured correctly and as I said, using the RTD code it is working properly, so the hardware is validated.
Anyone can help me with this issue?
Thanks,
MVR
Hello @PetrS,
I found the issue. We have a mosfet in the hardware to control the terminator resistor. If the mosfet is activated, the terminator circuit will be working.
The CAN0 doesn't have this mosfet. I didn't know about it... Also the registers are different, so these two things fooled me.
Thank you.
Note: I set manually the bitrate only to see if this is the problem, but the generated code for bitrate are different...
Ops, I made a mistake. CBT registers are not different, they are the same:
Sorry, I took a screenshot when I was changing the bitrate. But with the bitrate the same, CBT are the same.
Hello @PetrS ,
The generated code are the same, using the RTD 2.0.1 and the last version of AUTOSAR HF02 (S32K3_RTD_4_0_0_HF02_D2407_ASR_REL_4_7_REV_0000_20240725), but looking the registers, they are different:
Into the "FlexCAN_Ip_Vs_0_PBcfg.c" in both generated code we can see these values (this is one example about bitrate, but the other configuration are the same):
But the registers we can see different values:
How is it possible since the generated code is the same? Again, the CAN0 is working with the new version, but CAN1 is not working.
Note: Left side is the RTD 2.0.1 for S32DS - SW32K3_RTD_4.4_2.0.1 (S32K3_RTD_2_0_1_D2207_ASR_REL_4_4_REV_0000_20220707) and in the right side is the new library version for Tresos - SW32K3_RTD_R21-11_4.0.0_HF_02 (S32K3_RTD_4_0_0_HF02_D2407_ASR_REL_4_7_REV_0000_20240725).
Thank you,
MVR
Hi,
try to share simplified project so can be tested on EVB.
Maybe other try could be testing behavior on latest RTD.
BR, Petr
Anyone can help me?
Hello @PetrS ,
I changed the clock but still the channel 1 is not working... Do you have another idea?
Hi,
try to use same bit timing setting, even that the one you use in EB would be correct too.
Compare values actually written to bit timing registers.
Finally, do not use FIRC as PE clock source, select FXOSC, or PLL running from FXOSC.
BR, Petr