This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28035: SPI implementation without SPI ISR

Expert 1190 points
Part Number: TMS320F28035


Hello, rather than use the SPI ISR, I monitor the SPI status bit, When the status bit is high, the SPI data buffer is read.

The SPI ISR library includes additional code which is not required for this usage case. Can you confirm whether this is true

//  PieVectTable.SPIRXINTA = &spi_FIFOIsr      

//   SpiaRegs.SPIFFRX.bit.RXFFOVFCLR=1;         // Clear FIFO Overflow flag, the incoming  data rate is slow compared  to the read time
//   SpiaRegs.SPIFFRX.bit.RXFFINTCLR=1;           // Clear FIFO  Interrupt flag,  ISR is not used
//   PieCtrlRegs.PIEACK.all|=0x20;                           // PIE Hadrware level ACK

thanks

  • Hi,

    What do you mean by SPI ISR library?

    Mapping the ISR address in the PIE vector table is not done as part of ISR. It should be done as part of init. Also clearing the SPI status register has to be done in interrupt and polling mode. Clearing the PIEACK register is an added instruction in interrupt mode.

    To add, ISR might also include stack push and pull, in case you are using any local variables etc.

    Regards,

    Veena

  • [quote user="Veena Kamath"]

    Hi,

    What do you mean by SPI ISR library? c2000 ware example code

    Mapping the ISR address in the PIE vector table is not done as part of ISR. It should be done as part of init, I know the Init  code is not in the ISR

    clearing the SPI status register has to be done in interrupt and polling mode. ok

    Clearing the PIEACK register is an added instruction in interrupt mode, ok

    To add, ISR might also include stack push and pull, in case you are using any local variables etc. I'm using the polling mode, The ISR is not called items are not pushed on the stack in the ISR

    let me know if i missed something

    thanks