There are a few posts on this subject but none that specific address the issue.
So I have a custom built PCB based on the Teensy4.1 with ethernet; schematic is exactly the same to the letter.
Chip fires up nicely and it connects to the ethernet and the internet.
Other functions I2C work nicely.
However, I can't the SPI to work.
I have write a basic bit-bang sketch and the results are spot on; see attached sketch and logic analyser output. Perfect in fact; not fast but spot.
This proves the pins are connected correctly, not shorted, and accessed by the firmware to control them.
However, when I use the SPI, see attached a DigPot control sketch, I get no SCK and nothing on the MOSI that means anything. Please I am not sure that the CS pin is doing what it should be doing either.
So I suspected the SPI library. Normally use Visual Studio Code, but just reverting to Arduino IDE 2 to keep it simple.
Teensy library is loaded and the Libraries being used as per the compile output is as below.
/Users/JDC/Library/Arduino15/packages/teensy/hardware/avr/1.60.0
I have been on this a while now and I have run individual pin tests (flip flop GPIO states and monitored the Logic Analyser) for all connected pins on the chip (status LEDs, I2C etc) and there is no cross connection and all seem to operate as expected.
Please can you help?
So I have a custom built PCB based on the Teensy4.1 with ethernet; schematic is exactly the same to the letter.
Chip fires up nicely and it connects to the ethernet and the internet.
Other functions I2C work nicely.
However, I can't the SPI to work.
I have write a basic bit-bang sketch and the results are spot on; see attached sketch and logic analyser output. Perfect in fact; not fast but spot.
This proves the pins are connected correctly, not shorted, and accessed by the firmware to control them.
However, when I use the SPI, see attached a DigPot control sketch, I get no SCK and nothing on the MOSI that means anything. Please I am not sure that the CS pin is doing what it should be doing either.
So I suspected the SPI library. Normally use Visual Studio Code, but just reverting to Arduino IDE 2 to keep it simple.
Teensy library is loaded and the Libraries being used as per the compile output is as below.
/Users/JDC/Library/Arduino15/packages/teensy/hardware/avr/1.60.0
I have been on this a while now and I have run individual pin tests (flip flop GPIO states and monitored the Logic Analyser) for all connected pins on the chip (status LEDs, I2C etc) and there is no cross connection and all seem to operate as expected.
Please can you help?