LoRa-E5/Wio-E5 SPI2 flash example?

I’m testing my first PCB design prototype using the Wio-E5. I have a W25Q128JVSIQ flash chip wired up to SPI2. Has anyone connected flash (or other SPI device) to SPI2 and have a simple program I might use to test my design with?

I tried an example from the Sparkfun Arduino SPI flash library, but it didn’t seem like the stm32duino board manager had SPI2 set up. I haven’t found anything out there for the STM32WL with STM32CubeIDE either.

I’ll start writing something from scratch soon, but it sure would be great if there was a simple test using PA10, PB14 & PB13 for SPI2 that someone’s already written & shared.

Thanks!

It was super easy to get my flash chip to work with the Sparkfun example - I just had to set the SPI pins to the correct ones. If anyone else is looking to do a test, I used this library and the SPI_Flash_Example.ino included: GitHub - sparkfun/SparkFun_SPI_SerialFlash_Arduino_Library: A low level library for interfacing to serial flash ICs.

I modified the SPI settings before the myFlash.begin line like this:

SPI.setMOSI(PA_10);
SPI.setMISO(PB_14);
SPI.setSCLK(PB_13);
// Begin the flash using the chosen CS pin. Default to: spiPortSpeed=2000000, spiPort=SPI and spiMode=SPI_MODE0
if (myFlash.begin(PIN_FLASH_CS) == false)