4 Replies Latest reply on Jul 7, 2018 5:06 AM by HemanthR_06

    How to use FX3 SPI and UART in same firmware ?


      Hi All,


      Can anybody please let me know how to use SPI and UART same time in firmware ?


      As FX3 datasheet shows on its 'Pin Description' table that if we choose "16 - bit Data Bus + UART+SPI+I2S", then both SPI pins (GPIO[53 : 56]) and UART pins (GPIO[46 : 49] will be separate and we can use both peripherals in our firmware. Please refer attached datasheet snap shot.


      But which mode we have to set as per its API framework for IO matrix configuration as shown below here:


      typedef enum CyU3PIoMatrixLppMode_t


          CY_U3P_IO_MATRIX_LPP_DEFAULT = 0,   /**< Default LPP mode where all peripherals are enabled. */

          CY_U3P_IO_MATRIX_LPP_UART_ONLY,     /**< LPP layout with GPIF 16-bit and UART only. */

          CY_U3P_IO_MATRIX_LPP_SPI_ONLY,      /**< LPP layout with GPIF 16-bit and SPI only. */

          CY_U3P_IO_MATRIX_LPP_I2S_ONLY,      /**< LPP layout with GPIF 16-bit and I2S only. */

          CY_U3P_IO_MATRIX_LPP_NONE           /**< FX3S specific configuration where UART, SPI and I2S are disabled. */

      } CyU3PIoMatrixLppMode_t;


      I have tried LPP_DEFAULT, it doesn't work, because it is with 32bit GPIF. Then others are UART only, SPI only. But what if I need to use SPI and UART both ??


      Any help will be highly appreciable.