Im trying to communicate with a sepperate controller over SPIA using the F28069M with the DRV8301
The F28069M is behaving as a slave and is reveiving 4x16 bits at a time. This generates 4 interupts for my ISR at a baudrate of 1Mbaud.
This ISR is a different ISR from the mainISR function.
When i set the Run_identify to 0 i do get the full data 95% of the time but the other 5% i get only 3 interrupts in and my data gets out of sync with that.
When i set the Run_identify to 1 it gets even worse. Then i only see vallid data (and 4 interrupts) in 25% of the time.
What can i do to ensure my data integrity stays in tact 100% of the time?
My SPIA setup is shown below.
SPI_reset(obj->spiAHandle); SPI_enableRxFifo(obj->spiAHandle); SPI_setRxFifoIntLevel(obj->spiAHandle, SPI_FifoLevel_4_Words); SPI_disableLoopBack(obj->spiAHandle); //SPI_setBaudRate(obj->spiaHandle, SPI_BaudRate_1_MBaud); SPI_setCharLength(obj->spiAHandle, SPI_CharLength_16_Bits); SPI_setClkPhase(obj->spiAHandle, SPI_ClkPhase_Normal); SPI_setClkPolarity(obj->spiAHandle, SPI_ClkPolarity_OutputRisingEdge_InputFallingEdge); SPI_setMode(obj->spiAHandle, SPI_Mode_Slave); //SPI_setPriority(obj->spiAHandle, SPI_Priority_Immediate); SPI_enableRxFifoInt(obj->spiAHandle); SPI_enableInt(obj->spiAHandle); SPI_enable(obj->spiAHandle); SPI_resetRxFifo(obj->spiAHandle); PIE_enableInt(obj->pieHandle, PIE_GroupNumber_6, PIE_InterruptSource_SPIARX); CPU_enableInt(obj->cpuHandle, CPU_IntNumber_6); // enable SCI CPU interrupt
Thanks for the help!
Alain