Problems using the CyU3PDebugPrint calls..

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

cross mob
Cromagnon
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hello,

we have ported the working UVC application (AN75779) from the "EZ-USB ®FX3 SuperSpeed Explorer Kit" to our target board. We have dapted the schematic nearly exactly from the FX3 kit. We changed the USB connector to a C-type version. The software runs properly on the FX3-kit.

After loading the software into RAM of the device of our target board, host does not recognize the FX3 device. When the bootloader device disappears in the device manager list, no other device appears.

We have tried to debug to get to the cause of the problem using the "CyU3PDebugPrint" call.  Unfortunately, the CyU3PDebugPrint() is not very helpful in our case. The console gets only the output of the first "CyU3ODebugPrint" call. A second print instruction even directly after the previous one will not be seen.

We know that ThreadX may take over the execution of others threads in-between but at some time the second print should be reached and also executed.

For our target debug interface we connected the UART at GPIO53..GPIO56 und used an external TTL-USB converter: CY7C65213.

Does anyone know what could be the cause of this strange behaviour?

Kind regards

 

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Rolf,

1. Please see below article about how to terminate cc lines based on whether receptacle/plug is used in design.

Designing FX3™/CX3-Based USB Type-C Products - KBA218460 

I think you are using receptacle. If yes, then are you using Mux in your design as mentioned in above link?

2. It is recommended to provide maximum of 12pF external load capacitance when crystal is used.

Please check section 5.1.1 of AN70707 

3. It is necessary to follow the recommendation of decoupling caps and ferrite beads as shown in section 3.1 of AN70707

4. Decoupling and Bulk cap on VBUS is also needed. Please check explorer kit schematic. It has 4.7uF bulk and 0.1uF decoupling cap.

Regards,

Hemanth

View solution in original post

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

Hi,

Can you tell me where were the debug prints placed?

If possible share the firmware.

Also please review the schematic using AN70707

I note that the schematic matches for the most part with explorer kit. But do re-check: 22uF decap on vdd, pmode pin configuration, crystal connection, decaps on u3txvddq and u3rxvddq.

Regards,

Hemanth
0 Likes
Cromagnon
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi Hemanth,

sorry for the late reaction on your response. I did not expect to get an answer since the description of the problem is totally general and unspecific.

In the meantime I have taken great effort to find the reason, but up to now I was not able to solve the problem.

But to answer your question: It does not matter where the print-instruction is placed in code. I have tried to put some more printf at different locations. It is always the first "CyU3PDebugPrint" which is output to the console. All following outputs do not appear.

For a better understanding I will give you some more details of the application.

The board space was one requirement which lead to the decision only to have access to the UART. Normally this if enough to debug and find errors in code or even hardware. If this is not available anymore then you are blind.

The software which shall run on the board is taken from the AN75779. It was only necessary to make slight modification on the GPIF side and to modify some values in the USB decriptors to get the system running on the kit.

I have now been going back to a very simple SW project and took one of the examples from the book "Design By Example". It is the one from Chapter4Example6. This programm starts only three threads, which are printing som messages from time to time. In this way I am getting rid of all the complex USB protocols and complex function calls.

Even with this simple project, which I did not modify in any way, I can observe the same effect. The first printed message appears in the console and that's it. It does not matter how long the text is which I choose.

Since I have not modified the firmware beside adding or changing the print calls it make no sense to upload the projects.

Any clue or advice how to proceed?

Kind Regards

Cromagnon

 

 

 

0 Likes
lock attach
Attachments are accessible only for community members.
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Cromagnon,

I have run the example you mentioned on FX3 Explorer kit and the prints appear with no issue. Please find attached image.

Please try this: Load USBBulkSrcSink example firmware to your board and capture the USB logs and share with me.

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

Regards,

Hemanth
0 Likes
lock attach
Attachments are accessible only for community members.
Cromagnon
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi Hemanth,

I run the example "cyfxbulksrcsink" first with the kit. I have uploaded the output of this run. With the own hardware the enumeration of the device failed, I can't see a COM port in device manager.

I assume that we have still problems with the hardware. Therefore I have also uploaded the schematic of our FX3 board. Please can you check, if there is something wrong or missing.

Additionally we added 2 * 47uF capacitors for VCC12.

Kind Regards
Cromagnon

0 Likes
RR
Level 1
Level 1
First reply posted Welcome!

Hi Hemanth,

I'm working together with Chromagnon on this project.  Looks like our hardware is not working correct. using the  UVC_AN75779 example design, the device is enumerated as FX3 - trying to use the other two applications the behavior is really strange as Chromagnon mentioned above. 

Do you think this can be related to power supply issue? As we are using power planes on a very small hardware, we were not able to implement all the inductors as mentioned in the reference design. 

 

Regards, Rolf

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

Hi Rolf,

1. Please see below article about how to terminate cc lines based on whether receptacle/plug is used in design.

Designing FX3™/CX3-Based USB Type-C Products - KBA218460 

I think you are using receptacle. If yes, then are you using Mux in your design as mentioned in above link?

2. It is recommended to provide maximum of 12pF external load capacitance when crystal is used.

Please check section 5.1.1 of AN70707 

3. It is necessary to follow the recommendation of decoupling caps and ferrite beads as shown in section 3.1 of AN70707

4. Decoupling and Bulk cap on VBUS is also needed. Please check explorer kit schematic. It has 4.7uF bulk and 0.1uF decoupling cap.

Regards,

Hemanth
0 Likes
Cromagnon
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi Hemanth,

it seems that our problem is not caused by hardware. After a longer testing phase with different modification, it seems to be a software problem.

We are using a CYUSB3012 which has 256K of memory instead of 512K, which are available with the CYUSB3014 device. The memory layout of the application expects 512K of memory. Therefore the software crashes.

The next question will be, how to modify the application to run in the smaller device. 

I will setup another thread regarding this questions.

Thanks, and Kind Regards

Cromagnon

0 Likes