Other Parts Discussed in Thread: TCAN332, ALLIGATOR,
I made a custom pcb with a ESP32 WROOM and a TCAN332GDR. It is connected to a CAN device, with no termination, with a twisted pair of 1m. This does not work.
I have the TCAN-EVM and an off the shelf ESP32 dev board, it communicates with the CAN device at 500khz. This setup works.
Both are using the same software, a simple test program.
My custom pcb is shown below. The 120ohm resistor is not connected. I crammed a 100ohm resistor into the connector but no improvement. I set the device to use 125khz, but still no luck with my custom pcb.
I have a cheap usb logic analyzer that shows my CANBUS packet, but no response from the other CAN device. I do see the response when using the evm/dev board. (I do not know enough about CAN to say that there is absolutely nothing from the CAN device). I do not have anything that will show me the analog signal on the bus.
Both setups will transmit forever, (with or w/o the other device connected). This tells me that both setups are capable of reading their own transmissions.
My board does not have the 4.7uf capacitor between VCC and GND that I see on the TCAN-EVM, but ...
I then removed the TCAN332 chip and connected the TCAN EVM with some alligator clip wires to the custom pcb, and it still does not work (RX, TX, VCC, and GND).
Given this, I expected to find some pullups or caps on the gpio21/22 (rx/tx) on the dev board, but there is no such thing. The traces for 21/23 are short and bare.
I find no documentation indicating there is a difference between the ESP32-WROOM-32E (mine) and 32D (dev board) that would affect this.
The voltage on the dev board was 3.33 and the voltage on the custom board, which is powered by the ESP-PROG via usb was 3.28.
(https://oshwlab.com/cost.co/esp32_dev here is a virtually identical design from someone else, the only difference is that he's using the SN65HVD, and I am using the TCAN332 )
Can someone give me some ideas?
EDIT: Two of my boards are able to talk to each other.
Additionally, I put my board, and the esp32dev/TCAN EVM setup, and the CAN device all on the bus (this is really a star, but only 1 leg is 1m). Only the dev/evm setup is able to transmit and receive from the CAN device. My board hears nothing, and the dev/evm setup shows nothing when my board sends.
Finally I put another of my boards onto the star and it transmitted a packet that its twin hears, but not the dev/evm setup, but then it freezes. If I reboot that board, it delivers another to its twin. I think it freezes when it does not hear itself on the bus.
I'm going nuts.