CAN support broken in 1.17.3.b1?
I am working on an application with CAN-communication. I have been using 1.14.0.b1 and everything is working fine. I now upgraded to latest firmware. When my WiPy is booting (before boot.py executes) all communication on the bus shuts down. Downgrading to 1.14.0.b1 makes the system working again. If I disconnects the TX wire between WiPy and CAN-transceiver receiving data is working and no problem on the bus.
I have tried this on 2 different WiPy, 2 different expansion boards and 2 different CAN-tranceivers (SN65HVD230).
I have also been finding some CANbus issues on powerup.
I have been finding similar quirks which cause system wide boot up to cause issues because the pycom module does not always work on the bus. Sometimes this also seems to cause faults for other system.
I will be adding 10k pull up and pull downs in my design to help mitigate startup and reprogramming issues.
What is the weak pull down resistors? I am guessing between 47k and 100k
@xykon 100k didn´t help, but 10k seems OK. Haven´t been able to reproduce the issue with the resistor connected.
@johand Can you try adding a pull-up on the TX line? Try 100k first and then 10k.
During init all the pins are configured by default as input / weak pulldown, so overriding this with a stronger external pull-up might help.
You could also try looking into Pin.hold() to save the pin state prior to reset/deepsleep.
Some more testing...
When trying this with some testequipment on my desk 1.14 works fine, but when rebooting my WiPy with 1.17 communication between the 2 other CAN nodes stops for a short time.
When I try this in the environment where I plan to use the system (on a vehicle, J1939 bus) both 1.17 and 1.14 cause the same problem.
Do I have something connected the wrong way? I use a board called CJMCU-230 with a SN65HVD230 tranceiver. 3v3 and GND connected to the expansion board. CRX goes to G24 and TRX to G11.
Can this be a problem with the design of the CAN tranceiver board? Anything that can be done with the connection between WiPy and CJMCU-230?
Have been thinking about this a bit more. Since the problem occur before the CAN object is instatiated, it must be somthing happening with the IO during boot that makes the tranceiver do someting bad with the bus.
If I disconnect the TX wire between WiPy and tranceiver during boot and connect after boot everyting is fine.