To verify that I could make FD-CAN work in the next revision of the moteus controller, I made a simple desk setup between two NUCLEO-G474RE boards. I started by soldering up some breakout boards for the TCAN334G CAN transceiver I’m planning on using:
And then wired those up with a lot of jumper wires:
After a fair amount of fiddling, bisecting against the ST CUBE example project, and fixing some problems with my STM32G4 support in rules_mbed, I ended up with some 16 byte CAN frames being sent and received with a data rate of ~4Mbit.
2 thoughts on “Bringing up FD-CAN on the STM32G4”
Fun-fact, I recently realized you can clock the normal CAN peripheral on the STM32F4’s faster than 1 Mbaud, even though it’s not in the documentation anywhere I can find. I was able to get it up to 3 Mbaud on the F446. If you’re only going STM32 to STM32, it seems like a good option. I’m also planning on using the G4’s soon so I was looking into using CAN-FD, but tried this on a whim and surprisingly it worked.
Nice. Yeah, I was likely going to use non-standard >1Mbps for the regular frame also, (which the G4 can do too I suspect), just because the bus length is so short that it doesn’t matter.
Comments are closed.