Hello,
I keep coming back to SPIFIFO but have yet to get it reading correctly.
I've got it working fine with and DAC as that just involves sending but I simply can't get anything back from this serial flash chip.
This code returns the correct value.
These do not.
In every situation I get 0 back and don't see anything on the scope on the RX pin of the 3.1. There are things happening on CS, TX and CLK.
What am I missing?
Thanks.
I keep coming back to SPIFIFO but have yet to get it reading correctly.
I've got it working fine with and DAC as that just involves sending but I simply can't get anything back from this serial flash chip.
This code returns the correct value.
Code:
//setup
pinMode(10, OUTPUT);
spi4teensy3::init();
//loop
digitalWriteFast(cs,LOW);
spi4teensy3::send(0x05);
byte s=spi4teensy3::receive();
digitalWriteFast(cs,HIGH);
These do not.
Code:
//setup
pinMode(10, OUTPUT);
SPIFIFO.begin(10,SPI_CLOCK_12MHz); //other speeds have been tried
//this loop
SPIFIFO.write(0x05);
byte s1 =SPIFIFO.read();
//or this
SPIFIFO.write(0x05, SPI_CONTINUE);
SPIFIFO.write(0);
byte s1 =SPIFIFO.read();
byte s2 =SPIFIFO.read();
//or this
SPIFIFO.clear();
SPIFIFO.write(0x05, SPI_CONTINUE);
byte s1 =SPIFIFO.read();
SPIFIFO.write(0);
byte s2 =SPIFIFO.read();
In every situation I get 0 back and don't see anything on the scope on the RX pin of the 3.1. There are things happening on CS, TX and CLK.
What am I missing?
Thanks.
Last edited: