cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

wayu_4276666
New Contributor II

Hi Sir,

I have a question about config SPI 

io_cfg.useSpi = CyFalse;  <- use this setting , the CX3 can work well

io_cfg.useSpi = CyTrue;  <- use this setting , the CX3 can not work, the E-CAM can not recognized CX3

it seems the PC host not get the CX3 descriptor.

My setting as below:

#define DUMMY_COMPLEX_GPIO  56

main()

{

...

/* Configure the IO matrix for the device.*/
io_cfg.isDQ32Bit = CyFalse;
io_cfg.useUart = CyTrue;
io_cfg.useI2C = CyTrue;
io_cfg.useI2S = CyFalse;
io_cfg.useSpi = CyFalse;

io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT;

/* No GPIOs are enabled. */
io_cfg.gpioSimpleEn[0] = 0;
io_cfg.gpioSimpleEn[1] = 0;
io_cfg.gpioComplexEn[0] = 0x0;
io_cfg.gpioComplexEn[1] = 0x1<<(DUMMY_COMPLEX_GPIO-32);
status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

}

BR

 

Ben

0 Likes
1 Solution
AliAsgar
Moderator
Moderator

Hi Ben,

Please refer to pin description in the CX3 datasheet : https://www.cypress.com/file/133591/download.
Pin number 56 is for SPI_MISO when SPI is enabled, but in your application, 56 pin is also used as a complex GPIO. Try changing the pin for Complex GPIO.

Also, check if any of the APIs are failing in the firmware.

Best Regards,
AliAsgar

View solution in original post

0 Likes
2 Replies
AliAsgar
Moderator
Moderator

Hi Ben,

Please refer to pin description in the CX3 datasheet : https://www.cypress.com/file/133591/download.
Pin number 56 is for SPI_MISO when SPI is enabled, but in your application, 56 pin is also used as a complex GPIO. Try changing the pin for Complex GPIO.

Also, check if any of the APIs are failing in the firmware.

Best Regards,
AliAsgar

View solution in original post

0 Likes
wayu_4276666
New Contributor II

Hi Sir,

when i setting the io_cfg.useSpi = CyTrue, and must not setting the complex GPIO, then the CX3 can work well.

Thank you for your answer.

 

BR

Ben

0 Likes