Ladies and Gentleman,
I have a [SparkFun Thing Plus - SAMD51 and recently I needed a bigger memory to work as a kind of small datalogger. After a while a remembered that it has 4Mb (external) flash memory that communicates through SPI.
So I decided to test it with the [Adafruit_SPIFlash and the [SerialFlash. However, this Thing Plus has two sets of SPI pins and I don’t know how to use the FLASH_SPI facepalm, the other ones I’ve used without any problem. Could anyone give help on how to communicate with this flash memory?
- “NORMAL” SPI
// 22..24 - SPI pins (MISO,MOSI,SCK)
// ----------------------
{ PORTB, 11, PIO_SERCOM_ALT, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_11 }, // MISO: SERCOM4/PAD[3]
{ PORTB, 12, PIO_SERCOM, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_12 }, // MOSI: SERCOM4/PAD[0]
{ PORTB, 13, PIO_SERCOM, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_13 }, // SCK: SERCOM4/PAD[1]
- FLASH SPI
// ----------------------
// 33..36 SPI for Flash (SCK, CS, MISO, MOSI)
{ PORTA, 9, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, //SCK
{ PORTA, 10, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, //CS
{ PORTA, 11, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, //MISO
{ PORTA, 8, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, //MOSI
](GitHub - PaulStoffregen/SerialFlash: Library for using SPI Flash memory with a filesystem-like interface)](GitHub - adafruit/Adafruit_SPIFlash: Arduino library for external (Q)SPI flash device)](https://www.sparkfun.com/products/14713)