Hi all - new I’m new to Particle and new to Community, so …
I am using a M.2 BSOM Evaluation board with a B404X. I want to access the SD card, which as far as I can tell is on SPI1 (secondary SPI port).
I have the following:
static const int SD_CHIP_SELECT = D5;
static SdFat mSD(&SPI1);
And I am using SdFat=1.0.16
I find that this alone does not work. The only way I have been able to read/write to the SD card is by editing the pinmap_defines.h file buried in the Particle OS (/Users/xxxx/.particle/toolchains/deviceOS/4.0.0/hal/src/b5som/pinmap_defines.h) to be:
#define SS D5 /* D8 /
#define SCK D4 / D13 /
#define MISO D3 / D11 /
#define MOSI D2 / D12 */
I thought that assigning the SPI port to be SPI1 would be enough, but I need to ‘brute force’ it to get it to work. What am I missing?