We are currently experimenting with a “Colibri T20 512MB IT” board to improve the (graphics) performance. A standard Toradex image is installed with the most recent tdxall library.
As the board doesn’t provide a CAN-Bus interface we want to attach an external SPI to CAN-Bus adapter. So we need a working SPI interface which is routed to the base board, e.g. SPI-4.
Our problem is that the clock for SPI-4 is disabled, so the SPI-IP isn’t running. Can you provide information on how to activate the SPI-port? Maybe this is just some registry setting.
@andy.tx unfortunately, this does not work for us. We’re getting a handle from the init function, but if we want to set a config string/int on the handle, we’re getting a negative response from the method.
For better research, I attached my code (C# with TdxAllLib v2.2).
You cannot mix CAN and SPI handles. To call any CAN function, such as TegCan_SetConfigString(), you need to get a CAN handle by calling Can_Init() or TegCan_Init().
So you probably wanted to start your code with
m_hCan = can_teg.TegCan_Init("SPI4"); // instead of spi_teg.TegSpi_Init("SPI4")