CANbus... on ESP32

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Dutch
Posts: 9
http://meble-kuchenne.info.pl
Joined: Thu Jan 19, 2023 12:00 pm
Has thanked: 3 times
Been thanked: 2 times

CANbus... on ESP32

Post by Dutch »

Playing with canbus, and i got my 'trusted' ATmega328 functional on SPI via an external MCP2515/TJA1050. I have an canbus 'sniffer' setup seeing me sending a test line in a loop.

But the number of different can coded lines i want to send is much bigger than the memory of the AT. So i looked for bigger memory's and supported processors here in FC and the more modern ESP came along.

I have the ESP32 (devkitv1) working for a simple blink led. i did setup a loop sending one canbus line over SPI to external (and internal rx tx to TJA1050) and i meassure no signals at all with my occiloscoop. i have the blink led in the loop so i can see its running.
Some combinations of pins are blinking directly after reboot. Some take 5 seconds. some create to build to fail.

Anyone with a canbus project have succes using any particular setup of pins?
Attachments
ESP32 CANBUS test.fcfx
(16.01 KiB) Downloaded 4 times

chipfryer27
Valued Contributor
Posts: 1739
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 386 times
Been thanked: 597 times

Re: CANbus... on ESP32

Post by chipfryer27 »

Hi

Not at a PC just now so can't really check for your chip, however not all pins on ESP devices are actually available for general use. Some are used for such things as internal Flash and communications or are read-only.

If you have a datasheet specific to your board (and can share a link) it should document which pins can be used and also those to leave alone or have in a predefined state during boot.

Regards

Dutch
Posts: 9
Joined: Thu Jan 19, 2023 12:00 pm
Has thanked: 3 times
Been thanked: 2 times

Re: CANbus... on ESP32

Post by Dutch »

I found some 'conflicts' on this board. The pins GPIO1 and GPIO3 are RX and TX pins to the CP2102 UART on board used for bootload programming. so il avoid those.

Meanwhile just trying pins without any signal or volatage and connected a pull down resistor. and i shortend the delay time for the led... that last did it! i have result now! back to sharpening the settings ....

chipfryer27
Valued Contributor
Posts: 1739
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 386 times
Been thanked: 597 times

Re: CANbus... on ESP32

Post by chipfryer27 »

Hi

Glad to hear it is running.

Depending on whom you buy from, ESP boards can certainly have conflicts as accurate documentation seems a distant afterthought.

Regards

Post Reply