Skip to content

SPI.transfer(0) returns 255 with IC not present #4

@charlespax

Description

@charlespax

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions