3 Replies Latest reply on Jun 20, 2019 1:10 PM by JoMe_264151

    how can I send data from SPIS to SPIM?

    DaCh_4286001

      The practice is: on same chip. I will send data from SPIM and read data back from SPIS.

       

      I know SS line is controlled by SPIM, only when SPIM Tx FIFO NOT EMPTY, SS line will go low and allow transmission from SPIM to SPIS.

      By default,  it will force the SPIS "Interrupt on RX FIFO Not empty" to be on. After one byte is send from SPIM into SPIS RX FIFO , interrupt will be triggered, SPIS Rx will read data in Rx FIFO and move it into SPIS Rx Buffer, then SPIS Rx FIFO is empty now. All other processes are blocked during this interrupt.

       

      My question is:

      Now I am sending 10 bytes using SPIM_writeData(), I want slave to send back data starting from the 6th charater it receives in Rx Bxffer.

       

      in the SPIS_Rx_Not_empty ISR, in /* User code required at end of ISR (Optional) */ section, if I add SPIS_Write_data ('a' ) in it, why  I cannot send data back to master?

       

      Simon