AnsweredAssumed Answered

SPI with edma (32byte align problem)

Question asked by Martin Madron on Sep 25, 2015

Hello, my program keeps crashing when i try initi my DSPI driver. Worked without edma fine.

 

Here

dspiResult = DSPI_DRV_EdmaMasterInit(SPI0_IDX, &dspiMasterState, &userConfig, &stcdSrc2CmdDataLast);
    if (dspiResult != kStatus_DSPI_Success)
    {
        PRINTF("\r\nERROR: Can not initialize master EDMA driver \n\r");
    }

 

Driver says stcdSrc2CmdDataLast has to be 32 byte aligned. I have used gcc atribute to set align, no warnings or errors.

 

typedef struct EDMASoftwareTcd {

    uint32_t SADDR;

    uint16_t SOFF;

    uint16_t ATTR;

    uint32_t NBYTES;

    uint32_t SLAST;

    uint32_t DADDR;

    uint16_t DOFF;

    uint16_t CITER;

    uint32_t DLAST_SGA;

    uint16_t CSR;

    uint16_t BITER;

} edma_software_tcd_t __attribute__ ((aligned (32)));

Original Attachment has been moved to: customDspi.c.zip

Outcomes