Re: Trouble develop with CAN & MCP2515/2518
MARINO SILVIO <m.silvio@...>
Hello Andersen,
toggle quoted message
Show quoted text
I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them. Thank you if you want to help me. Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts. Silvio Marino Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto: Hi, You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation. Are you trying to use Zephyr SocketCAN? Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree: - Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can - Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can ./Brix -- Henrik Brix Andersen On 19 Sep 2022, at 09.22, m.silvio@... wrote:> > Hello, > see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending > > there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch? > Thank you very much. > Silvio > > > > <image001.png>Silvio Marino > R&D Manager – Electronic Consultant > Phone: +39 346 1066499 > Skype: live:marino.silvio > Web: https://babos.it > P > - Before printing think about environment and costs > - Prima di stampare pensa ai costi ambientali > > |
|