SPI Examples using ESP-IDF? MCP2515 CAN Controller lib?

nosuffix
Posts: 2
Joined: Wed Oct 07, 2020 7:55 pm

SPI Examples using ESP-IDF? MCP2515 CAN Controller lib?

Postby nosuffix » Wed Oct 07, 2020 8:06 pm

Hi all,

I am trying to communicate with MCP2515 CAN Controller using VSPI. I would like to use IDF for development and avoid the Arduino libraries. For various unrelated reasons I have to use MCP2515 and not the built in CAN controller. I looked through the examples in the IDF folder for SPI, but it's a bit confusing. Are there any articles or tutorials that would guide me to using VSPI to read and write registers on the target device? I think I can figure our the rest, but if someone knows of a ready to go MCP2515 CAN library that works in the IDF, please let me know as well.

Thank you very much!

dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

Re: SPI Examples using ESP-IDF? MCP2515 CAN Controller lib?

Postby dmaxben » Tue Oct 13, 2020 2:24 pm

Im interested in this too...all of the existing MCP2515 drivers rely on Arduino bits and just dont seem to work with ESP-IDF that well.

I havent been able to find one that really works nicely/natively with IDF. :(

nosuffix
Posts: 2
Joined: Wed Oct 07, 2020 7:55 pm

Re: SPI Examples using ESP-IDF? MCP2515 CAN Controller lib?

Postby nosuffix » Sat Oct 17, 2020 5:30 pm

I ended up writing my own driver. It's not robust, just a few functions since I only need very simple operation. I'll post it later if I clean it up and make it functional more generically.

Galotem
Posts: 1
Joined: Sun Oct 18, 2020 5:33 pm

Re: SPI Examples using ESP-IDF? MCP2515 CAN Controller lib?

Postby Galotem » Sun Oct 18, 2020 5:35 pm

Can I using the same spi standard (https://911electronic.com/spi-communica ... spi-works/) for PIC32 can connection?

dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

Re: SPI Examples using ESP-IDF? MCP2515 CAN Controller lib?

Postby dmaxben » Sat Oct 24, 2020 11:35 pm

nosuffix wrote:
Sat Oct 17, 2020 5:30 pm
I ended up writing my own driver. It's not robust, just a few functions since I only need very simple operation. I'll post it later if I clean it up and make it functional more generically.
Does it use ISR's and queues? Id be curious to try it out.

Raskier
Posts: 1
Joined: Wed Dec 23, 2020 10:53 am

Re: SPI Examples using ESP-IDF? MCP2515 CAN Controller lib?

Postby Raskier » Wed Dec 23, 2020 10:58 am

Hi,

is there any update? I am new to ESP-IDF and I am trying to set up communication via SPI between two ESP32 using MCP2515. Any sort of example or help would be appreciated.

Thank you

Who is online

Users browsing this forum: Google [Bot], Hamzah Hajeir and 144 guests