I am using the SPIFlash library on my device and it works great when the flash chip is present. I have found, however, that if the chip is not present, the library hangs when calling flash.initialize() from my Arduino sketch.
I have found that when a chip is not present on my hardware SPI.transfer(0) returns 255, which makes readStatus() always return 255, which makes busy() always return 1, which makes while(busy()); in command() loop forever, which makes my firmware hang.
The problem is that a flash chip not present looks like a busy flash chip. I think it would be great if a no present flash chip were not busy.
For my journey down this rabbit hole, see PaxInstruments/t400-firmware#125
I am using the SPIFlash library on my device and it works great when the flash chip is present. I have found, however, that if the chip is not present, the library hangs when calling
flash.initialize()from my Arduino sketch.I have found that when a chip is not present on my hardware
SPI.transfer(0)returns 255, which makesreadStatus()always return 255, which makesbusy()always return 1, which makeswhile(busy());incommand()loop forever, which makes my firmware hang.The problem is that a flash chip not present looks like a busy flash chip. I think it would be great if a no present flash chip were not busy.
For my journey down this rabbit hole, see PaxInstruments/t400-firmware#125