FX3 is not detecting in U3Z2 board

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.
DhN_4227681
Level 4
Level 4
First like received

Hi,

Previously, I booted the working code of FX3 its detecting fine . But after SPI FLASH, i booted the another FX3 code by adding GPIF 2 read and write configuration then reset the device. After reseting the FX3 is not detecting in the U3Z2 board. what may be the problem? If i add the GPIF 2 read and write is wrong?

Find the attached code below, which was booted to U3Z2 board.

Regards,

Dhanuja

0 Likes
1 Solution

Dhanuja,

This problem generally happens when the firmware which is booted is not proper. there are chances where the device would be seen in Device manager and not in control center.

When you have PMODE lines (PMODE[2:0] = 0Z1 ) for SPI flash boot every time the device will be booted from FLASH. If the firmware in flash will be having errors the device wouldn't be seen in the control center (although seen in device manager).

Please follow these steps:

- So, first  we will come back to USB boot loader mode. For this set the PMODE lines for USB boot i.e. PMODE[2:0] = Z11. Check the PMODE lines status after setting them.

- Reset the device and plug it again.

- Now the device should enumerate as Fx3 Bootloader Device in Control Center.

- After this you should be able to program your flash again.  program the flash with some default example from the firmware (spiregmode/spidmamode example) and not your custom firmware.

- After the programming is successful, Change the PMODE lines to SPI boot with USB fallback i.e.  PMODE[2:0] = 0Z1

- Reset the device and plug it again.

- Now the device should enumerate in the control center

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
24 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Dhanuja,

The CyFxAppErrorHandler() might be executing after the changes you have done. So, change the boot mode to USB and load your firmware with CyU3PDeviceReset(CyFalse) added in -- if (apiRetStatus != CY_U3P_SUCCESS). You can check this for latest modifications done by you (I mean to the latest APIs added).

Regards,

Hemanth

Hemanth
0 Likes

Hi,

Ok, I will check the APIs.

And U3Z2 board is connected via USB, but it is not detecting in control center.

Regards,

Dhanuja

0 Likes

Hello Dhanuja,

The booting of the board is from USB or SPI Flash? Please confirm

Let me know the results after checking the API.

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

The U3Z2 device is not detecting in control center itself.

The booting is done in SPI FLash only.

Find the below attachment.

Regards,

Dhanuja

0 Likes

Hello Dhanuja,

Can you share the firmware? To help you with debugging.

Did you try booting some default firmware from SPI Flash?

If not can you try programming any one of  UsbSpiRegMode/UsbSpiDmamode example into FX3 RAM and pass the vendor commands to read/write from/to Flash. You can refer to readme.txt file in the example folder. This is to check the SPI connection.

If SPI connection is fine, you can try putting CyU3PDeviceReset(CyFalse) at different places one by one from the start of the firmware i.e. main(). This will help in debugging.

There is possibility that some API might be failing leading to entering in the error handler (infinite loop). This can be a reason that you don't see the device in control center (or not enumerating).

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hello Rashi,

I know the FX3 booting using SPI Flash and also i know how to erase that previous booting code.

But my problem is, in control center device is not detecting(i.e cypress fx3 boot loader device is not obtained in board).

Find the attached below and this is the previous booted code.

Regards,

Dhanuja

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Dhanuja,

I found that the error is in iomatrix configuration.

The pins that you are using for SPI i.e. 53,54,55,56 cannot be used as you are using them for the UART.

    io_cfg.gpioSimpleEn[0]  = 0;

    io_cfg.gpioSimpleEn[1]  = 0x01E00000; //for spi

If you want to use UART then you need to configure different pins for SPI.  If you don't want to use UART then you can use these pins by overriding them.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi,

Now we don't want the UART pins.

After booting, the hardware is not supporting itself, its not detecting in control center. If any change can be done in hardware.

Regards

Dhanuja 

0 Likes

Hello Dhanuja,

If you don't need the UART pins.You can change the iomatrix to

    io_cfg.s0Mode = CY_U3P_SPORT_INACTIVE;

    io_cfg.s1Mode = CY_U3P_SPORT_INACTIVE;

   io_cfg.useUart   = CyFalse;

    io_cfg.useI2C    = CyTrue;

    io_cfg.useI2S    = CyFalse;

    io_cfg.useSpi    = CyFalse;

#if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 0)

    io_cfg.isDQ32Bit = CyFalse;

    io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_DEFAULT;

#else

    io_cfg.isDQ32Bit = CyTrue;

    io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_DEFAULT;

#endif

    /* No GPIOs are enabled. */

    io_cfg.gpioSimpleEn[0]  = 0;

    io_cfg.gpioSimpleEn[1]  = 0x01E00000; //for spi

    io_cfg.gpioComplexEn[0] = 0;

    io_cfg.gpioComplexEn[1] = 0;

    status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

But i can see that you are using the UART for debugging (CyFxSlFifoApplnDebugInit) . If you make io_cfg.useUart   = CyFalse; you won't be able to get the debug prints and cannot use CyFxSlFifoApplnDebugInit in the firmware.

If you want to get the debug prints i.e. use UART you need to change the pins that you are using for SPI i.e you cannot use pins 53,54,55 and 56 for SPI.

Please confirm that you have stored  the firmware code in the SPI and then when FX3 is programmed with this firmware it is not seen in the Control Center. Is my understanding right? Or  without  programming FX3 with this firmware it is not seen in the control Center? Please let me know the problem.

After booting you are not getting the device in control center (which means improper enumeration) because the device enumerates when the usb descriptors are sent to the host successfully.

In the firmware that you shared in your previous post, there is failure in iomatrix configuration (in the main) because of which the descriptors are not being sent.The descriptors are sent in CyFxSlFifoApplnInit function which is not called as there is error in main() function.

If the FX3 is not enumerating without programming with this firmware the you would need to check the PMODE lines.

Please let know if any other queries

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi,

Without programming FX3 in control center we can see cypress FX3 boot loader device. This will not obtained in control center.

Previously that code was working fine, after changing the GPIF 2 configuration and booted that code and then in control center it not visible that cypress fx3 boot loader device.

0 Likes

Hello Dhanuja,

This means after programming FX3 with your firmware it is not coming on the Control Center.

You have two options make your firmware enumerate in the control center:

1) If using UART that means io_cfg.useUart   = CyTrue; You cannot use io_cfg.gpioSimpleEn[1]  = 0x01E00000; //for spi.

2) If you want to use 53,54,55a nd 56 pins for SPI then you cannot use UART i.e you need to make io_cfg.useUart   = CyFalse;

On doing so you can use UARt for debugging so you need to change the firmware accordingly. You cannot use CyFxSlFifoApplnDebugInit in your firmware.

After booting you are not getting the device in control center (which means improper enumeration) because the device enumerates when the usb descriptors are sent to the host successfully.

In the firmware that you shared in your previous post, there is failure in iomatrix configuration (in the main) because of which the descriptors are not being sent.The descriptors are sent in CyFxSlFifoApplnInit function which is not called as there is error in main() function.

Regards,

Rashi

Regards,
Rashi
0 Likes

Ok, I will make the changes what u have told.

Thank you

0 Likes

Hi,

The hardware is not detecting in the control center itself, how can i check code without visible the cypress fx3 boot loader device.

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Dhanuja,

Please share what modifications did you do to the firmware.

Also try programming with both .c files one by one (refer attachment). Check if enumeration is proper (in control center). I have tested these files at my end by replacing these files in default slavefifosync firmware. Please check the attachment.

If this doesn't work, please share  your full firmware folder (not only .c file)

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

Please understand my question if the hardware is not  detecting in control center means how can i check the code.

How can i programming to be done

Find the attachment below.

0 Likes

Hello Dhanuja,

You confirmed  in the previous post " Without programming FX3 in control center we can see cypress FX3 boot loader device. This will not obtained in control center." and know you are saying that without programming the device is not enumerating. Please be clear.

Please understand my question if the hardware is not  detecting in control center means how can i check the code.

How can i programming to be done

>> Please share the PMODE lines settings. As per previous discussion, you told the PMODE lines are set for SPI Flash booting.

Please confirm. Also,which firmware is programmed in the flash when booting is done?

Also, program the flash with bulksrcsink example and try booting. Let me know the results.

If PMODE lines are set for SPI FLASH boot and If you have your firmware in the SPI Flash and then the device is not enumerating. Is this the case?

If not please explain the steps you are following

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

In device manager  I am able to detect FX3 as "cypress fx3 USB streamer example device", but in control center i am not finding FX3 device.(I have attached Screen shot). To try with software reset, First i should be able to detect the FX3 device in Control centre. The thing is i am not able to detect it so can you please help me out to solve this issue?

Thanks,

Dhanuja

0 Likes

Hello Dhanuja,

Thank you for clearing the confusion.

From the control center (in the attachment) it seems that you are not using updated SDK 1.3.4.

- Have made some changes to the .inf file? Please let me know the VID/PID of device from the device manager

- Which is the driver version that you are using?

- Also, refer to this thread which registers similar problem CY7C68013A no device in control-center after program RAM or EEPROM . the device mentioned here is different

- Uninstall the device and bind the newer version of driver(1.2.3.20)  C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\driver\bin\Win10

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi,

I am using the SDK version 1.3.4.38.

-Device Manager of VID_04B4 and PID_00F1.

-Device Manager version is 1.2.3.20.

And also updated the driver for the device, but still it not able to detect the device in control center.

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Dhanuja,

Please confirm the Control Center version (refer the attachment).

This version will be available in SDK https://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

First, i was opened the control center, it was not detecting the device.

After debugging through segger, in control center the fx3 device is detecting. what may be the problem?

control center version :- Cycontrol-- 1.2.3.0

                                        CyUSB-- 1.2.3.0

Please find the below attachment.

0 Likes

Dhanuja,

What happens when you don't use segger and normally replug the device?

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi,

If we don't use the segger means in control center its not detecting the FX3 device.

0 Likes

Dhanuja,

This problem generally happens when the firmware which is booted is not proper. there are chances where the device would be seen in Device manager and not in control center.

When you have PMODE lines (PMODE[2:0] = 0Z1 ) for SPI flash boot every time the device will be booted from FLASH. If the firmware in flash will be having errors the device wouldn't be seen in the control center (although seen in device manager).

Please follow these steps:

- So, first  we will come back to USB boot loader mode. For this set the PMODE lines for USB boot i.e. PMODE[2:0] = Z11. Check the PMODE lines status after setting them.

- Reset the device and plug it again.

- Now the device should enumerate as Fx3 Bootloader Device in Control Center.

- After this you should be able to program your flash again.  program the flash with some default example from the firmware (spiregmode/spidmamode example) and not your custom firmware.

- After the programming is successful, Change the PMODE lines to SPI boot with USB fallback i.e.  PMODE[2:0] = 0Z1

- Reset the device and plug it again.

- Now the device should enumerate in the control center

Regards,

Rashi

Regards,
Rashi
0 Likes