News for hackers. Stuff that matters.
Re:Docker containers in space by bsder on Wednesday October 16, 2019 @07:58PM (#21277490)
> The typical way to add CAN to a raspberry pi is an MCP2515 chip. The linux driver for the MCP2515 can barely service the chip fast enough though, which means it tends to drop data at the higher bitrates.

This isn't always the fault of the driver. The MCP2515 is just a kind of crappy controller and has lots of bugs in spite of how much it's used. Even on a Beaglebone (which doesn't struggle to keep up), the MCP2515s are somewhat suspect.

The Beaglebones have a CAN controller on board, so all you need to do is hook up a CAN transceiver and you're good to go. (Being able to use Wireshark to debug CAN is really quite a nice change over most nasty CAN tools ...) And because the controller is part of the silicon, it's really fast.

DIY Beaglebone CAN Bus Cape https://www.instructables.com/id/DIY-Beaglebone-CAN-Bus-Cape...

Commercial BeagleBone RS485 CAN Bus Cape https://copperhilltech.com/beaglebone-rs485-can-bus-cape/

Re:Docker containers in space by sgtnoodle on Saturday October 19, 2019 @12:08PM (#21299168)
I didn't mean to imply that the linux driver is of poor quality. It's just a matter of the kernel's inability to schedule "soft interrupt" handlers with low enough jitter to guarantee the hardware is serviced fast enough. The MCP2515 certainly doesn't make it easy as it only has two RX mailboxes without FIFO semantics. It's kind of funny because any old 8-bit MCU has plenty of oomph to reliably drive an MCP2515 but rediculously powerful 64-bit SoC boards can't handle it.