I found the problem: https://github.com/LowPowerLab/SPIFlash/issues/16
The sketch I used to verify the SPI Flash was missing a SPI.begin() in setup().
I hooked up a logic analyzer and discovered that there was no activity on SCK, MOSI and MISO when trying to use the SPI Flash.
Wrote my own sketch that only reads the jedec id from the SPI Flash and it worked. Must be something with the SPIFlash lib version.
Attaching a screenshot from the logic analyzer showing the jedec id read from the SPI Flash.
I have a problem with a AT25DF512C SPI flash module. Using the SPIFlash library I can initialize the flash but when I try to read the device ID it is zero. Also if I write data and then read it back it is also zero.
I'm using an ATMega328P-AU TQFP. The flash CS is connected to A2 (16). MOSI, MISO and SCK connected normally. CS has a 4.7k pullup.
Any ideas why the SPI only returns zeros? Please see my schematic at: https://www.openhardware.io/view/348
Would AT45DB041E be a good choice as a OTA flash? I see it's in the schematics for the new Sensebender Micro mk2.
I soldered just the two caps and an MCP1703 on a new board and have not manage to fry it. So maybe there is another cause. I'm suspecting the WS2812, it's new on my latest batch of sensor boards. But I don't understand how it could destroy the voltage regulator or ATMega.
Maybe something is wrong with the PCB layout causing some unwanted currents?
Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.