2 Replies Latest reply on Jan 29, 2020 7:46 AM by MichaelF_56

    SPI polling configuration for SCB


      Hi Team,


      I am presently using Cypress Traveo II SoC for one of the Automotive usage.

      There is requirement from customer that SPI driver is required in polling mode.


      SCB7 peripheral is used for the same to communicate with one slave device.


      I have modified the cypress provided library cy_scb_spi.c file.



      unRX_FIFO_STATUS.stcField.u9USED checking the FIFO status register field whether data is available in Receive FIFO, then breaking while loop and trying to read data to local buffer.

      Unfortunately the loop is breaking immediately and observed that no data available in buffer but data is present in FIFO.


      while(base->unRX_FIFO_STATUS.stcField.u9USED != 0);


      As temporary solution a small for loop delay is added and observed that data is copied to local buffer correctly.


      Request to provide any suggestion and confirm whether the using register and bit is correct for polling method.



      Sai Kumar Ponneri