Hi, colleagues.
Here are some details about hardware and software:
I have got my own custom board with AM3354 module from axonim and ads131e04 on it.
They connected threw SPI0. Drdy goes to gpio.
To make it works together I decided to use sysbios. My IDE is CCS Version: 6.1.3.00033, debug probe is tixds100v2.
I have managed to run simple spi with polling to configure read ADC registers, configure it and set to RDATAC mode.
I have managed to run edma example from mcspiFlash_edma.c.
I have managed to run edma transaction from one buffer to another after gpio event. (i used button to activate gpio event on falling adge)Now, I'am trying to run chained transaction example from TRM, to make spi work synchronously with drdy, but it does not work.
I understand that it is hard to say what's wrong, so I'am going to start with paramset.
Please, somebody, check my paramset initialisation.
Paramset number1:
EDMA3CCPaRAMEntry paramSet; //struct from starterware, so it should be OK
paramSet.srcAddr = (unsigned int) &dummy_buf[0]; // declaration is volatile unsigned char dummy_buf[4]={0,0,0,0};
paramSet.destAddr = (unsigned int) (SOC_SPI_0_REGS+MCSPI_TX(1)); // defines from starterware.
paramSet.aCnt = 11; // 2bytes for each channel of ADC + 3 status bytes
paramSet.bCnt = 1;
paramSet.cCnt = 1;
paramSet.srcBIdx = 0;
paramSet.destBIdx = 0;
// A - sync Transfer Mode is set in OPT.
// srCIdx and destCIdx set to zero since A-SYNC Mode is used.
paramSet.srcCIdx = 0;
paramSet.destCIdx = 0;
paramSet.linkAddr = 0xFFFF; // Linking transfers in EDMA3 are not used.
paramSet.bCntReload = 0;
paramSet.opt = 0x00000000;
// SAM and DAM fields both are set to 0
paramSet.opt |= ((19 << EDMA3CC_OPT_TCC_SHIFT) & EDMA3CC_OPT_TCC); //19 - tccnum of spi0_ch1_rx event
paramSet.opt |= EDMA3CC_OPT_ITCCHEN|EDMA3CC_OPT_TCCHEN; //from TRM example
//starterware func
EDMA3SetPaRAM(SOC_EDMA30CC_0_REGS, EDMA3_GPIOEVT0, ¶mSet); // EDMA3_GPIOEVT0 defined as 22
Paramset number2:
paramSet.srcAddr = (unsigned int) (SOC_SPI_0_REGS+MCSPI_RX(1));
paramSet.destAddr = (unsigned int) &Buffer[0]; // declared like - unsigned char Buffer[64];
paramSet.aCnt = 11; //
paramSet.bCnt = 1; //
paramSet.cCnt = 1; //
paramSet.srcBIdx = 0; // The srcBidx should not be incremented since it is a h/w register.
paramSet.destBIdx = 1; // The destBidx should be incremented for every byte.
// A sync Transfer Mode.
// srCIdx and destCIdx set to zero since ASYNC Mode is used.
paramSet.srcCIdx = 0;
paramSet.destCIdx = 0;
// Linking transfers in EDMA3 are not used.
paramSet.linkAddr = 0xFFFF;
paramSet.bCntReload = 0;
paramSet.opt = 0x00000000;
// Set TCC field in OPT with the tccNum.
paramSet.opt |= ((19 << EDMA3CC_OPT_TCC_SHIFT) & EDMA3CC_OPT_TCC);
// EDMA3 Interrupt is enabled and Intermediate Interrupt Disabled.
paramSet.opt |= EDMA3CC_OPT_TCINTEN;
// Now write the PaRam Set to EDMA3.
EDMA3SetPaRAM(SOC_EDMA30CC_0_REGS, 19, ¶mSet);
Best Regards, Roman