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.

SPI on TMS320f28335

Other Parts Discussed in Thread: TMS320F28335

i am transmitting a data through spitxbuf for n times(while(1) loop). only the receinving interrupt of spi is set.  after certain number of times spi receive interrupt is set and the code written in SPI receive data is being executed.

in the ISR i' m transmitting data through SCI. whcih i'm able to see on hyper terminal.

why the SPI receive interrupt is being set when i'm transmitting data through SPI.

The internal loopback is disabled.

i dont want to disable the SPI receive interrupt of DSP(TMS320f28335).

is it that after transmitting certain amount of data through TXBUF of SPI the buffer is getting full and generating an interrupt.

i am monitoring the int flag and it is not being set.

  • Hello Pankaj,

    I realize your original post is quite old, but I think it might relate to my current problem.

    My issue is that unexpected SPI RX interrupts are occuring when data is being transmitted through SCI.

    Did you ever solve your problem?

    Stephen

  • Hi Stephen,

    Please open a new post. So that its easier for everyone to spot the thread.

    So, you mean to say SCI communication is affecting your SPI Rx line?

    Regards,

    Gautam

  • That's correct.

  • It's happening on two UART ports (SCIA and SCIC).  The problem goes away if I remove the call to enable the Transmit Empty Butter Interrupts, so it seems like the transmission is the issue.  The data is being transmitted.  The only issue is that the SPI interrupt is occurring sometimes when it shouldn't be.  I am using the SPI and both of the MCBSP ports to retrieve data from three external ADCs. Both MCBSP ports are running at 9.38MHz and the SPI port is running at 4.69MHz.  Since the SPI is running at the slow bit rate, my code expects the SPI interrupt to occur last.  However, that's not happening sometimes because of the unexpected SPI interrupt.

    Stephen 

  • This should not happen! Did you check your board layout? Seems more like board noise related issue.

    Regards,

    Gautam

  • That's what I have been doing.  I just haven't found out what hardware problem is causing the issue.

  • I just haven't found out what hardware problem is causing the issue.

    Yup, i know its hectic to spot the component or the layout error causing noise on board. If you feel software configuration might be causing this issue, then start from scratch. Test one channel each  ie SCIA & SPI1 and then keep introducing other.

    Regards,

    Gautam