Hello,
1. I modified the project and in cancom1:flexcan component changed the PE clock source from SOSCDIV2 to SYS CLOCK. I regenerated all the source files with processor expert and flashed new firmware.
My CAN interface from Vector reports an error: bit error , error position 84.
Why? Processor expert should not provide options which will break CAN communication right?
As it was mentioned above about clock accuracy, I do not recommend you use bus clock for CAN-FD or CAN. The crystal oscillator clock should be selected whenever a tight tolerance (up to 0.1%) is required in the CAN bus timing. The crystal oscillator clock has better jitter performance than PLL-generated clocks.
2. I started over again with flexcan_encrypted_s32k144 example project. 500 kbaud, every thign was fine. I modified the project and in cancom1:flexcan component changed the PE clock source from SOSCDIV2 to SYS CLOCK. Additionaly I disabled CAN FD and set the baudrate to 125k in cancom1:flexcan and in sbc_uja11691. I regenerated the files.
Again vector canoe would show error frames only. I managed to get rid of the bug, by manually modifiying bitrate.preDivider from 23 to 22. The value value calculated by processor expert leads errornous frames. It seems that the calculation of .preDivider is wrong here.
Would you please comment on this?
I will ask someone from SDK development team to provide some feedback to this question.
Regards,
Martin