Open interfect opened 3 years ago
I've found this forum post claiming that the SPI flash is used by the bootloader for something.
If so, why bother to expose SPI1
and the FLASH_*
macros to Arduino sketches, and assign Arduino pin numbers? And even if it is holding Important Bootloader Things, shouldn't I still at least be able to get it to report back its ID?
I recently ordered a SAMD51 Thing Plus, and I wanted to try and use the on-board SPI flash memory chip (an Adesto AT25SF041 on my board).
It looks like the variant sets up the macros that let the SPI library define an SPI1 that will talk to the flash chip:
https://github.com/sparkfun/Arduino_Boards/blob/682926ef72078d7939c12ea886f20e48cd901cd3/sparkfun/samd/variants/SparkFun_SAMD51_Thing_Plus/variant.h#L148-L158
And 91492c20c0e7b8c8c0afdc28985e98389f87aa80 by @AndyEngland521 made sure to configure the relevant pins to actually expose sercom0 (which backs SPI1) to the physical pins on the MCU.
But I'm struggling to verify that 91492c20c0e7b8c8c0afdc28985e98389f87aa80 actually worked to enable communication with the flash chip. Both with the SPIMemory library (which supports the AT25SF041) aimed at
FLASH_SS
andSPI1
, and with just using SPI1 myself to send the0x9F
"Read Manufacturer and Device ID" command from the data sheet, I'm not getting any indication that the chip is hearing me. I see all 0s where I should be seeing the device ID coming down the line.My simplest test sketch is here:
@AndyEngland521, can you share the test sketch you used to verify that 91492c20c0e7b8c8c0afdc28985e98389f87aa80 fixed communication with the flash chip? Or is there any other known good example code that talks to that chip?
I haven't been able to find any examples that have ever gotten the onboard flash chip working, only this person in August asking about it on the SparkFun forums and getting nothing when referred to the Arduino forums.
I suspect that, despite the reconfiguration of the pin definitions, the flash chip on the board still may not actually be accessible.