LLD
LLD copied to clipboard
SPI-Communication at part12 is not working on RPi4
I tested the SPI-communication at part 12 with an ENC28J60 connected to a RPi4 (I merged the driver from here. It did'nt work out with your code so I went for debugging. There was something weird with the CS line. I change the code for setting the CS-line (Pin8) to the code from the driver and then it worked.
-
possibility: You tested it on Rpi3 The Registers pupd_enable of RPi3 divers from RPi4 see picture.
-
possibility: SPI timing In your example, you are only sending messages. With ENC28J60, I also receive messages, so the timing of the CS line is wrong for the ENC28J60 (CS line needs to be active low for a longer time before MOSI-message starts)
The relevant question: Did you (or somebody else) tested your example with RPi4 also?