Msg#19 is the update and I am still connecting up devices one by one. I still have not had any lock ups.
So I suspect that there is an error on the custom board somewhere. Or there is ringing on the SPI that could be causing it.
Please can we...
To update you.
I have taken a original Teensy4.1 with ethernet, and a DAC8775 EVM board.
Connected them up and SPI_MODE1 does NOT hang the code.
And also the comms is perfect and the method written to do a comms check with the DAC8775 comes back...
Hi Paul
The code for the project is quite large and too complex to be sending on this forum.
However, just a simple SPI sketch does the same thing.
// include the SPI library:
#include <SPI.h>
// set pin 10 as the slave select for the SPI...
OK. So the whole reason for getting the logic analyser out in the first place was because SPI_MODE1 locks the firmware.
I had a few devices on the SPI bus and I have debugged them all individually and they are all working a absolute treat...
Actually your entire Issue was:
Sorry, but there simply was not enough information to go on. I have not touched this code for a couple years now, and a lot of it, was done something like 8 years ago. And you are probably right that the mode...
I’m not convinced FlexIOSPI actually honours the requested mode, so if you need anything other than MODE0 you’re possibly out of luck. I asked @KurtE (the library author) about it, and the response was
FlexIO would give you a bigger choice of pins to use, or potentially allow higher speeds and/or more flexible modes (like quad/octal io) but in most cases LPSPI will give "smoother" performance due to the hardware FIFOs.
For info FlexIO sketch below.
Question is, is there any advantage to using FlexIO over using SPI?
#include <Arduino.h>
#include <SPI.h>
#include <FlexIO_t4.h>
#include <FlexIOSPI.h>
#define PIN_MOSI 11
#define PIN_MISO 12
#define PIN_SCK 13...
Thanks for all your support it is really appriciated.
Knowing that I was on the right track helped me to diagnose this down to a corruption possible of files after a MACOS update and also settings on the Logic Analyser.
I now have it all running...
I have tried a whole lot of sample rates on the Saleae and in the
SPI.beginTransaction(SPISettings(100000, MSBFIRST, SPI_MODE0));
It is not a case of it not quite working, there is just no SCK at all.
I have even written a direct LPSPI sketch...
I have done this on a Teensy4.0 too and it works and use what ever CS pin you want.
I did all my development for the custom board on a Teensy4.0 and it was working an absolute treat.
I have now tried to run SPI
MOSI (Pin11) - White trace
MISO...
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...