EndPoints are not Enumerating

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
GiSa_4520796
Level 4
Level 4
First like received

Hi,

I am using the below attached firmware before i am using it for transferring data from P-Port to U-Port which is working fine and endpoints are also enumerating properly and after that i modified firmware to work for P-Port to S0-Port after that endpoints are not enumerating.

Can you please go through the firmware and tell what might be the reason?

Regards,

Srujana.

0 Likes
1 Solution

Hello Srujana,

As per the above IOMatrix configuration, you are not supposed to use GPIO 53 to 56 pins as GPIOs.

These pins are mapped to UART block when we set LPP MODE to CY_U3P_IO_MATRIX_LPP_UART_ONLY.

I can see that you are using GPIO 53 to 56 for SPI (as per comment). Hence, the IOMatrix is failing.

Since you are not using Storage port #1, you can enabled SPI and UART (I2S too if needed) and set the LPP MODE to CY_U3P_IO_MATRIX_LPP_DEFAULT.

With the following settings, the UART and SPI block are mapped to UART - Pins 49:46 and SPI  - Pins 56:53.

    io_cfg.isDQ32Bit        = CyFalse;

    io_cfg.s0Mode           = CY_U3P_SPORT_8BIT;

    /* If the UART is used for logging, we can only configure the S1 port as 4 bits wide. */

    io_cfg.s1Mode           = CY_U3P_SPORT_INACTIVE; //CY_U3P_SPORT_4BIT;

    io_cfg.lppMode          = CY_U3P_IO_MATRIX_LPP_DEFAULT;//CY_U3P_IO_MATRIX_LPP_UART_ONLY;

    io_cfg.useUart          = CyTrue;

    io_cfg.gpioSimpleEn[0]  = 0;

    io_cfg.gpioSimpleEn[1]  = 0x00000000;

    io_cfg.gpioComplexEn[0] = 0;

    io_cfg.gpioComplexEn[1] = 0;

    io_cfg.useI2C           = CyTrue;

    io_cfg.useI2S           = CyFalse;

    io_cfg.useSpi           = CyTrue;

    status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

    if (status != CY_U3P_SUCCESS)

    {

    CyU3PDeviceReset(CyFalse);

        goto handle_fatal_error;

    }

View solution in original post

0 Likes
6 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Srujana,

Is the device enumerating? Do mean the device is not enumerating?

If yes, before the  CyU3PUsbSetDesc some API would be failing and entering into fatal error i.e. for(;) loop. You can try calling CyU3PDeviceReset(CyFalse) in the condition which checks the API is failing. If the Device resets that API would be failing.

Are the descriptors proper? Did you modify the descriptors?

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi,

Thank you for your reply.

Is the device enumerating?

     Yes,first the device is enumerating as Bootloader Device but in control center the device is not enumerating after i  program the above attached firmware.

Did you modify the descriptors?

     No,i didnt modify any descriptors.I changed consumer socket only from U-Port to S-Port.

Before Programming:

1.PNG

After Programming:

2.PNG

Please let me know what is the issue?

Regards,

Srujana.

0 Likes

Srujana,

1. Looks like the CyU3PDeviceConfigureIOMatrix API is failing.

     Can you please confirm it by calling CyU3PDeviceReset(CyFalse) in following if condition?

     status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

         if (status != CY_U3P_SUCCESS)

         {

    CyU3PDeviceReset(CyFalse)

             goto handle_fatal_error;

         }

     If the IOMatrix fails, the device will reset to Bootloader and you can see bootloader device in control center.

2. What is the value you have set to CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT macro?

     Please set it to "0" and modify the LPP mode as follows:

     #if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 0)

        io_cfg.isDQ32Bit = CyFalse;

         io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_UART_ONLY;

Regards,

Sridhar

0 Likes

Hi Sridhar,

I made the changes as u said in the previous reply.

If the IO Matrix fails, the device will reset to Bootloader and you can see bootloader device in control center.

     Yes,now i am getting bootloader device in control center even after programming the device.

3.PNG

This is the IO Matrix Configuration.

4.1.PNG

What modifications should be done in firmware to enumerate the endpoints?

Regards,

Srujana.

0 Likes

Hi Sridhar,

Can you please help me to solve the above issue?I am waiting for your reply.

Regards,

Srujana.

0 Likes

Hello Srujana,

As per the above IOMatrix configuration, you are not supposed to use GPIO 53 to 56 pins as GPIOs.

These pins are mapped to UART block when we set LPP MODE to CY_U3P_IO_MATRIX_LPP_UART_ONLY.

I can see that you are using GPIO 53 to 56 for SPI (as per comment). Hence, the IOMatrix is failing.

Since you are not using Storage port #1, you can enabled SPI and UART (I2S too if needed) and set the LPP MODE to CY_U3P_IO_MATRIX_LPP_DEFAULT.

With the following settings, the UART and SPI block are mapped to UART - Pins 49:46 and SPI  - Pins 56:53.

    io_cfg.isDQ32Bit        = CyFalse;

    io_cfg.s0Mode           = CY_U3P_SPORT_8BIT;

    /* If the UART is used for logging, we can only configure the S1 port as 4 bits wide. */

    io_cfg.s1Mode           = CY_U3P_SPORT_INACTIVE; //CY_U3P_SPORT_4BIT;

    io_cfg.lppMode          = CY_U3P_IO_MATRIX_LPP_DEFAULT;//CY_U3P_IO_MATRIX_LPP_UART_ONLY;

    io_cfg.useUart          = CyTrue;

    io_cfg.gpioSimpleEn[0]  = 0;

    io_cfg.gpioSimpleEn[1]  = 0x00000000;

    io_cfg.gpioComplexEn[0] = 0;

    io_cfg.gpioComplexEn[1] = 0;

    io_cfg.useI2C           = CyTrue;

    io_cfg.useI2S           = CyFalse;

    io_cfg.useSpi           = CyTrue;

    status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

    if (status != CY_U3P_SUCCESS)

    {

    CyU3PDeviceReset(CyFalse);

        goto handle_fatal_error;

    }

0 Likes