CX3 prototype went unstable

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

cross mob
user_4665121
Level 2
Level 2

Hello,
I am blind or simply out of luck. However, I did design prototype board for CX3 and I got following issues (except power supply, but it was probably counterfeit TI part):
1. Device boots into bootloader even with programmed flash. It started after few SPI flash programming cycles, seen it before on Denebola too, but it spontaneously went away then.
2. Code loaded to RAM is not working properly (even code I checked first on Denebola). Got two symptoms:
a. DMA related error (0x51) appears sometimes

b. Streaming happens, but ends very quickly (example error messages below)

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0
StpCB:In SET_FTR 0::1
bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

I do believe it may be related to power issues (first I replaced faulty TI part with Torex buck converters, then went for LDO). Each power ball pair have 0.1µ (0r 10n if smaller value was preferred by datasheet) as close as possible on bottom layer. I've tried paralleling caps with other ones, but without luck. I can provide full Altium project for review.

0 Likes
1 Solution

EDITTED

Hello,

Regarding Flash

The flash S25FS064S makes use of hybrid sectors and not uniform sectors. Due to this flash erase will not work as expected. This could be a reason why you were not able to boot properly from flash.

Please find a similar thread which addressed the same problem with a different flash part.

fx3 cannot boot from s25fs128s

​Regarding Streaming issues

We recommend that you use the latest version of FX3 SDK (1.3.4) for development. SDK 1.3.4 has got fixes for several bugs reported by different customers. The change in the behaviour that you see between 1.3.3 and 1.3.4 will be due to a combined effect of all these fixes.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
21 Replies
MiDa_1966691
Level 4
Level 4
10 replies posted 10 sign-ins 5 solutions authored

I few suggestions:

I would isolate the issues:

=========================================================================================================

1. Device boots into bootloader even with programmed flash. It started after few SPI flash programming cycles, seen it before on Denebola too, but it spontaneously went away then.

Answer:

The CX3 is set up for Bootstrap using the PMODE Lines – If it is configure incorrectly or if your device ( Flash is being held ) it will jump to Bootloader mode.

On your prototype Board:

- Check your PMODE LINES and make sure that it is configured correctly

- Check the SPI lines and make sure they are not being held down.

2. Code loaded to RAM is not working properly (even code I checked first on Denebola). Got two symptoms:

Answer:

Instead of trying to get your full design working at once – Example: CX3 and Imager working

– I would run a codebase that Tests as much as possible without the Imager.

Under the Cypress USB Code examples:

https://www.cypress.com/documentation/code-examples/usb-superspeed-code-examples

Project:  cyfxuvcinmem

This example demonstrates the USB video class device stack implementation for FX3.

The example repeatedly streams the pre-filled images from the FX3 system memory to the USB host PC. This example uses Isochronous endpoints.

Note: Since you are using a CX3 – you will have to rebuild.

         I use this all the time when I’m testing new hardware – tests our CX3 and complete Path for UVC image to appear on PC.

Image is stored in Memory and will use DMA and then Transport Image thru USB endpoint – Use standard – Video

Various Host applications allow you to display and capture video from a UVC device.

Example:  AMCap (Version 8.0), and Debut Video Capture software. 

a. DMA related error (0x51) appears sometimes

- Using this example will test out DMA path  --

b. Streaming happens, but ends very quickly (example error messages below)

- Using this example it test out Streaming make sure all your endpoints are set up correctly –

Note:

I have built for the CX3 Denebola Board  --

Let me know and I can send you files.

After testing the cyfxuvcinmem example and confirming it works on your Hardware.

– Now you can add in your Imager with I2C commands and frame/ resolution etc ..

Hope that helps

- Mike

0 Likes

From what I found with uvcinmem it seems to be working fine in RAM, however when flashed this image into flash - it was booting without USB stack (probably something was not set properly). Anyways - code did not caused fallback bootloader to fire up.
PMODE[0:2] lines are connected in following manner: 1Z0, with proper resistors on PMODE lines (just as in Denebola). Will investigate it further, but I take into account improperly generated image.

It seems, that it can be either MIPI block or imager, that is causing the problems - however I will really target the supplies. Nothing else would explain fact, that stream lasts anywhere from few frames to few seconds (board was wired with replacement power supply instead of primary parts - TI converter was drawing high current even without load and TI engineers confirmed "layout is ok").

With sensor powered up there is "CB Failure" in error log - I wonder, if USB3.0 gone unstable (and yes, device was configured with 3.0 only UVC descriptors)

0 Likes

My thoughts:

I would focus on the Boot Issue only from RAM.

- Get that working so it is correctly program and run from flash memory --  Then move on to the other issues.

You said:

PMODE[0:2] lines are connected in following manner: 1Z0, with proper resistors on PMODE lines (just as in Denebola).

It is possible the PMODE lines are fine.

I would look at the SPI Flash.

Most  SPI Flash Devices will have an Active LOW ( /HOLD) line .

Make sure that line is pulled up –

If the /HOLD line is floating or pulled down it might be shutting of SPI flash device -

- CX3 will not see image and go into bootlader

Question:

What SPI flash device are you using?

Can you send a Cut and Paste  -- schematic of  PMODE lines and SPI Flash –

If you get past this point t and you can program and run from flash , I'm happy to help you on the other issues.

Mike

0 Likes

There is SPI flash section. Even with internal pullups in S25FS064S I've placed physical ones. SCK is pulled low as in AN76405.

pastedImage_0.png

PMODE lines:
pastedImage_1.png

0 Likes

Hello,

First of all, Thanks to Mike for supporting our customers over community. We appreciate your support!

As Mike said, I also feel that we should debug the SPI flash issue first.

I have a couple of comments on the schematics shared. Please find them below:

1. It is not required to ground the SCK pin of the flash. The reason why it is grounded in the App note that you have mentioned is that the flash part used in the document requires a 100K pulldown on the SCK pin. Please refer to page 10 of the datasheet (link below) to understand that this part requires 100K resistor on SCK pin. You can directly route SCK pin from FX3 to that on the flash.

https://media.digikey.com/pdf/Data%20Sheets/Micron%20Technology%20Inc%20PDFs/M25P40.pdf

2. Does the datasheet of the flash recommend to pull up the CS pin? If not, please route the CS pin of FX3 directly to flash.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

After I removed pullup on CS and pulldown on SCK I have "SPI flash erase failed" during programming. So these resistors are apparently needed. It seems, that internal pullups of flash chip are too weak for CX3 to work properly.

0 Likes

Hello,

According to my understanding, when you are placing the pullup on CS and pulldown on SCK, and try programming the flash, the control center will show Programming Succeeded. But while booting from Flash, the enumeration fails. Also, when you remove the pullup on CS and pulldown on SCK, the control center shows SPI flash erase failed. Is my understanding correct? If not, please let me know the problem that you are facing.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Yes, this is behavior I am facing. With pullup on CS and pulldown on SCK everything is being flashed correctly (as reported by control center) but just will not boot (to be more precise: it boots to bootloader, aka WestBridge device). I have seen this behavior also on Denebola boards and I think it may be related to image generation.
Without this two resIstors I have "Flash erase failed" so I will just stick to initial solution (both present).

However this doesn't solve problems with streaming stability

0 Likes

Hello,

Please let me know if you are using the sensor OV5640 itself for your project? From this question, I meant to understand if the code that was developed for your custom board can be tested with denebola kit or not. This can be used to understand the failure in enumeration of your custom board and the streaming issues.

In addition to this, please try the following:

1. Program the SDK example USB Bulk Source Sink found in the following location into the flash of your custom board:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink

2. Now try booting from the flash.

3. Let me know if the device enumerates as Streamer Example Device or not.

Also, please answer my following questions:

1. Are you using any other SPI devices on your custom board?

2. If the enumeration fails after performing the test mentioned above, please probe SCK and MISO lines and share it with us.

3. Regarding streaming, please let us know which API returns error code 0x51.

4. Apart from this error code 0x51, is there anything else that you encounter?

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hello,
I am developing for other sensor, OVM9724. I've made custom shield for it to test on Denebola and it was really painful to get it to work (mostly due to Omnivision policy) but anyways I had it done and tested. Denebola with custom shield is now working seamlessly at host application dept. I've flashed same image to custom board. Most important differences are: power supply is now switched mode (Torex XCL219 converters) and IC is CYUSB3064.

I've programmed BulkSourceSink. Device enumerates and is stable, but cannot boot from SPI flash (even with "programming succeeded" message).

There are no other SPI devices on the bus. There is other I²C device on SCCB, but it doesn't interfere with sensor.
I will probe SCK and MISO lines and attach it here later (need to drive to lab for now)

0x51 seems to be reported at

CyU3PUsbGetEP0Data(CX3_UVC_MAX_PROBE_SETTING_ALIGNED, glCommitCtrl, &readCount);

But it is purely random. Constant error is CB Failure  (CX3_DMA_RESET_EVENT) but it seems to happen at first try to start the streaming only.

0 Likes

Hello,

Along with the traces of SCK and MISO, please let me know the following:

1. What are the power domain voltages that you are using for the custom board? Is it same as that used in denebola kit?

2. Please let us know if the 1.8V Power domain is stable or not.

3. I understand that when you tried to program Bulk Source Sink to flash, control center displayed programming success. But the boot failed. At this time, did the device enumerate as Bootloader device or did it not enumerate at all?

4. After programming the flash with control center, program the RAM with the SDK example cyfxflashprog (Located in the following path):

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxflashprog

There are vendor commands used in this firmware to read the contents of Flash. Please go through the readme.txt provided in the above location to understand the vendor command for read from flash. Then, use the same vendor command and check if the flash content is same as the firmware image. If they are different then the flash write is not successful.

Please let me know if you have any queries on this.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hello, we decided to send board for x-ray inspection.
1. Power domains:
1.2V for U3TX/RXVDDQ, VDDMIPI, VDD and AVDD
1.8V for VDDIO1, VDDIO3 and CVDDQ (with proper governor ic on this line)
3.3V for VDDIO2 (for easy access to UART)

Each of power domains (except VDD) is filtered with ferrite beads (BLM15AG121SN1D, but I also tried shunting them with wire) and decoupled (I've even tried to attach some largers caps than in original design to offset cercap derating).
USB 3.0 is stable. However, I am getting DMA errors from this call:

status = CyU3PDmaMultiChannelCommitBuffer (chHandle, (dmaBuffer.count + 12), 0);

Next test probably in late evening. Where can I put Altium project to be reviewed? I do believe it is obvious. Just cannot find it.

0 Likes

Hello,

Please use the "Use Advanced Editor" option on the top right side of the response window. You can attach the file using the advanced editor. Please let me know if you are facing difficulties to attach the project.

Also, please let me know the error code when CyU3PDmaMultiChannelCommitBuffer() API fails. Also, please let me know if it fails repeatedly or only once? Also, please let me know if the same code when tested in the denebola kit showed the same result or not.

In addition to the questions in this response, please provide me with the information requested in my response 11 to understand the issue better.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
OpKa_1922276
Level 2
Level 2

Hello;

Have you found the root cause and fixed this issue?

I faced a simliar issue:

1. I can program to flash and enumerated in device manager.

2. When I open the camera use Amcap, it can show image from 1s to 30+seconds..

3. When the Amcap lost frame, there is "CB Failure" in Uart log...

4. Re-open the Amcap, it can start streaming, but lost frame soon...

Hope to get your answer soon..

Thanks a lot.

0 Likes

I have not found solution yet, for development purposes I made another Denebola shields. This week I received my own logic analyzer and I will finish second revision of PCB just to be sure, that everything will run smoothly (mostly I will just copy LimeSDR's and/or Denebola power supply with adjustments needed for 4-layer board).

In case of Denebola SPI flash problem was related to VIO voltage (seems that flash needs 3.3V, but on my board there is 1.8V compatible one).

0 Likes

Hello,

It is possible to use a 1.8V SPI flash on your board if the corresponding power domain voltage is 1.8V. The flash S25FS064S makes use of hybrid sectors and not uniform sectors. Due to this flash erase will not work as expected. This could be a reason why you were not able to boot properly from flash.

Please find a similar thread which addressed the same problem with a different flash part.

fx3 cannot boot from s25fs128s

Regarding the CB failure error, according to my understanding, this error occurs when the API CyU3PDmaMultiChannelCommitBuffer() fails as per our previous discussion. Please let me know the error code when this API fails so that I can debug this issue.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hi Jay

The error code is 0x47, Could you please help to debug?

Note: Around 30% module have this issue...

Thanks

cx3_error.png

0 Likes

Hello,

Please let me know if you tested all the boards on the same PC or not?

Please check if the device is enumerated as USB 3.0 or not. This can be done by using the API CyU3PUsbGetSpeed(). Please use the debug prints to display the USB speed on the failure case. Also, take care that the debugprint API is not called in any of the callback functions.

We have seen the 0x47 status reported by CyU3PDmaMultiChannelCommitBuffer() API before and a possible fix is suggested in the following KBA.

Invalid Sequence Error in Multi-Channel Commit Buffer - KBA218830

Please go through this KBA and try implementing the changes recommended. Please let us know if this helps you.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hi Jay;

I got those failure module working normally now.

The only change is make the Build Variables to 1.3.4 from 1.3.3.

Does the 1.3.4 SDK have improved some kind of this issue?

Thanks

0 Likes

EDITTED

Hello,

Regarding Flash

The flash S25FS064S makes use of hybrid sectors and not uniform sectors. Due to this flash erase will not work as expected. This could be a reason why you were not able to boot properly from flash.

Please find a similar thread which addressed the same problem with a different flash part.

fx3 cannot boot from s25fs128s

​Regarding Streaming issues

We recommend that you use the latest version of FX3 SDK (1.3.4) for development. SDK 1.3.4 has got fixes for several bugs reported by different customers. The change in the behaviour that you see between 1.3.3 and 1.3.4 will be due to a combined effect of all these fixes.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
OpKa_1922276
Level 2
Level 2

Hello:

Add one more info,

5. Not 100% module have this issue, there is fail rate.

Thanks@

0 Likes