Tool/software: Code Composer Studio
Hello,
board: EK-TM4C129EXL, TIDM-TM4C129SDRAMNVM
compiler: 18.12.2 LTS
TI-RTOS: 2.16.08
I have the following booster pack assembled: TIDM-TM4C129SDRAMNVM and the shipped examples are running well, namely: ektm4c129_qssi_example. I have also modified the fatsd_EK_TM4C129EXL_TI example project file EK_TM4C129EXL.c with the following configuration to make the SSI1 interface to use the SDCard on the booster pack :
/*
* =============================== SDSPI ===============================
*/
/* Place into subsections to allow the TI linker to remove items properly */
#if defined(__TI_COMPILER_VERSION__)
#pragma DATA_SECTION(SDSPI_config, ".const:SDSPI_config")
#pragma DATA_SECTION(sdspiTivaHWattrs, ".const:sdspiTivaHWattrs")
#endif
#include <ti/drivers/SDSPI.h>
#include <ti/drivers/sdspi/SDSPITiva.h>
SDSPITiva_Object sdspiTivaObjects[EK_TM4C129EXL_SDSPICOUNT];
const SDSPITiva_HWAttrs sdspiTivaHWattrs[EK_TM4C129EXL_SDSPICOUNT] = {
{
.baseAddr = SSI1_BASE,
.portSCK = GPIO_PORTB_BASE,
.pinSCK = GPIO_PIN_5,
.portMISO = GPIO_PORTE_BASE,
.pinMISO = GPIO_PIN_5,
.portMOSI = GPIO_PORTE_BASE,
.pinMOSI = GPIO_PIN_4,
.portCS = GPIO_PORTB_BASE,
.pinCS = GPIO_PIN_4,
},
{
.baseAddr = SSI3_BASE,
.portSCK = GPIO_PORTQ_BASE,
.pinSCK = GPIO_PIN_0,
.portMISO = GPIO_PORTQ_BASE,
.pinMISO = GPIO_PIN_3,
.portMOSI = GPIO_PORTQ_BASE,
.pinMOSI = GPIO_PIN_2,
.portCS = GPIO_PORTP_BASE,
.pinCS = GPIO_PIN_4,
}
};
const SDSPI_Config SDSPI_config[] = {
{
.fxnTablePtr = &SDSPITiva_fxnTable,
.object = &sdspiTivaObjects[0],
.hwAttrs = &sdspiTivaHWattrs[0]
},
{
.fxnTablePtr = &SDSPITiva_fxnTable,
.object = &sdspiTivaObjects[1],
.hwAttrs = &sdspiTivaHWattrs[1]
},
{NULL, NULL, NULL}
};
/*
* ======== EK_TM4C129EXL_initSDSPI ========
*/
void EK_TM4C129EXL_initSDSPI(void)
{
/* SDSPI0 configuration */
/* Enable the peripherals used by the SD Card */
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI1);//
/* Configure pad settings */
GPIOPadConfigSet(GPIO_PORTB_BASE,
GPIO_PIN_5 | GPIO_PIN_4,
GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD);
GPIOPadConfigSet(GPIO_PORTE_BASE,
GPIO_PIN_5,
GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD_WPU);
GPIOPadConfigSet(GPIO_PORTB_BASE,
GPIO_PIN_4,
GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD);
GPIOPinConfigure(GPIO_PB5_SSI1CLK); //
GPIOPinConfigure(GPIO_PE5_SSI1XDAT1); //
GPIOPinConfigure(GPIO_PE4_SSI1XDAT0); //
/* SDSPI1 configuration */
/* Enable the peripherals used by the SD Card */
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI3);
/* Configure pad settings */
GPIOPadConfigSet(GPIO_PORTQ_BASE,
GPIO_PIN_0 | GPIO_PIN_2,
GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD);
GPIOPadConfigSet(GPIO_PORTQ_BASE,
GPIO_PIN_3,
GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD_WPU);
GPIOPadConfigSet(GPIO_PORTP_BASE,
GPIO_PIN_4,
GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD);
GPIOPinConfigure(GPIO_PQ0_SSI3CLK);
GPIOPinConfigure(GPIO_PQ3_SSI3XDAT1);
GPIOPinConfigure(GPIO_PQ2_SSI3XDAT0);
/*
* These GPIOs are connected to PA2 and PA3 and need to be brought into a
* GPIO input state so they don't interfere with SPI communications.
*/
GPIOPinTypeGPIOInput(GPIO_PORTA_BASE, GPIO_PIN_2);
GPIOPinTypeGPIOInput(GPIO_PORTA_BASE, GPIO_PIN_3);
SDSPI_init();
}
The SD card can be formatted to fat file system. So, both hardware are tested. SD Card is tested with fatFs and qssi is tested with the original example.
My goal is use FatFs on QSSI flash memory.
If I use the fatfs example but with jumper position on qssi on boosterpack, the fatfs can not created.
Can you please help me how can I use SDSPI_fxn functions to work with QSSI Flash memory? As I saw, SDSPI_ is used to interface with external storage.
Thank you for your help!
