0 Replies Latest reply on Sep 17, 2020 7:19 AM by SaKu_4388591

    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


      This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.