2019-03-07 09:12 AM
I made several custom PCBs using the STM32F446RET6 chip. At first the CAN seemed to work fine, by reading it out with a Kvaser (CAN sniffer). However problems arrived when attaching other devices (like a beagle bone) to the CANbus. The beagle bone only receives a few of the messages (like 1%) and also on the Kvaser sometimes a lot of error frames can be seen. The code has also been tested on a Nucleo F446RE using a shield for the CAN hardware (which is the same as used on the PCB). I measured the CAN signal with an oscilloscope and both voltage and timing seemed good. Also I tried multiple chips and they all did not work.
However after this I desoldered the chip from the nucleo (STM32F446RET6U) and put it on the PCB, with all other hardware and software the same, and suddenly everything works perfectly.
In the datasheet I could not find a difference, but is there a difference between the STM32F446RET6 and STM32F446RET6U? Because that might explain the problem.
Another idea I had is that on a logic analyzer the oscillator of the STM32F446RET6 seemed slightly too fast. I tried to use the trim register, however it only trimmed it the wrong way. But that would mean a calibration error in the STM32F446RET6, however I tried multiple chips, all with the same problem.
If anyone has any idea what the problem or a solution could be I would be happy to hear it.
Please find attached some of the images I made with the oscilloscope.