Core 3.0 issues with parallel SPI
Posted: Tue Dec 17, 2024 5:33 pm
I've been operating a DIY LiFePO4 BMS for a number of years. Recently I've made a change to the Sketch and now the two SPI peripherals (SD memory and LTC2452 (ADC)) fail to work. They work with ver. 2.0.11, not with 3.1.0. Ver. 3.1.0 will work with SD or the ADC separately but not together.
#define SD_CS 5 // Define CS pin for the SD card
#define adc_CS 32 // SPI select pin for adc LTC2452
#define SCLK 18 // D18 SPI SCLK
#define MISO 19 // D19 SPI MISO
#define MOSI 23 // D23 SPI MOSI
In Setup()
This is commented out for SD to work:
adc = new SPIClass(VSPI);
adc->begin(SCLK, MISO, MOSI, adc_CS);
And this is commented out for ADC to work:
SD.begin(SD_CS);
#define SD_CS 5 // Define CS pin for the SD card
#define adc_CS 32 // SPI select pin for adc LTC2452
#define SCLK 18 // D18 SPI SCLK
#define MISO 19 // D19 SPI MISO
#define MOSI 23 // D23 SPI MOSI
In Setup()
This is commented out for SD to work:
adc = new SPIClass(VSPI);
adc->begin(SCLK, MISO, MOSI, adc_CS);
And this is commented out for ADC to work:
SD.begin(SD_CS);