USB HID enumeration clock setup with external TCXO potential bug

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

cross mob
conradc2380
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

Hi ,

I am running a PSOC6 USB HID Generic setup ,  The code works from the IMO clock trimmed to  USB mode.

The problem I am currently experiencing is when everything is run from the IMO  clock at 96Mhz  (because it can't go higher  😞   ) the HID enumerates and I can send data .  However, switching this to the external TCXO gives me much more accuracy and a potential for higher core clocks the  HID side does not work anymore although the paths in the Device configurator and dividers are set up correctly .

I principal the initial sources are the only side that changes , so it should not affect the USB enumeration

Below is 4 scenarios on this 2 working and 2 not working. in order to increase the CORE clock I need everything to run from the EXTCLK . The cores need to be CM4 150Mhz and the CM0 75Mhz  , as it is right now this is not possible.

IMO working config below

conradc2380_0-1676120515008.png

EXTCLK NOT working 1

conradc2380_1-1676120631329.png

 

Extclk NOT working2

conradc2380_2-1676120899287.png

 

Extclk working 2

conradc2380_3-1676121062958.png

 

Any assistance is welcome.

Regards

C

 

 

 

0 Likes
1 Solution
conradc2380
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

Hi @Aashita_R 

After a further month of trying to figure out this problem ,I found that in both the CM0 and CM4 the following files need to be added . It's a bit disappointing that the Device configurator setup somehow does not get included in the build process and that these files are needed when anything is changed in the Device configurator .

#include "cycfg.h"

init_cycfg_all();/* Set up the device based on configurator selections */

Regards

Conrad

 

View solution in original post

0 Likes
4 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @conradc2380 ,

For USB to function properly and enumerate correctly, the USB device block should be clocked at 48 MHz with an accuracy of ±0.25%. In all the scenarios where ExtClk is working, I can see that you have tried to achieve that accuracy. This is an important parameter and it is one of the reasons why a high-accuracy clock like IMO works. 

When USB is present the USB Start-of-Frame (SOF) signal is used to trim the IMO to ensure that the IMO matches the accuracy of the USB SOF. As per my understanding, it is possible to run USB device block with the help of an external crystal oscillator at the desired accuracy of ±0.25%. 

I hope this helps. Please add here in case of any further query or if I am missing any information.

Best Regards,

Aashita

0 Likes
conradc2380
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

Hi Aashita,

 

Thansks for the reponse .  There is two point that maybe was not clear .  You might have missed my previous point .

1, When I run everything off the internal IMO clock with the trimming  the USB works however I am not able to run the cores at full speed  and the maximum I can achieve is 96Mhz.  IMO will not work for the application.

2, every clock needs to run off the EXCLK , the TCXO needs to be the main clock , I need the USB and the Core clocks needs to be running at full speeds as mentioned before .

 

in Essense because the TCXO provides temperature and accuracy it is the choice for me and everything should run from it . But it does not no matter what the changes on the clock diagram, i need to find out why  because the parameters are correctly setup with correct deviders .

could this be replicated at infineon side?

 

Regards

Conrad

 

 

0 Likes
conradc2380
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

@Aashita_R 

Have you had any further development your side  to look into this clock problem .  I am feel certain this is a BUG somehere in the core of the modus or the device config.

I have tested this with a TCXO and External crystal on the ECO pins. It does not matter if you run from the TCXO or the ECO crystal the USB does not work from those clock sources.  

I believe the clock bus parameter needs to be connected to the IMO. If this is connected to a different clock its stops functioning , and it does not matter that the dividers are correct for this parameter when running off external clocks.

Setting the USB device clock to the external  ECO or TXO but setting the peripheral slock bus parameter to the IMO seems to allow it to function .

This is what i have to do to achieve the usb functionality and have higher cpu speeds , i do not feel this is good setup as the purpose of using the external clocks are bypassed this way.

 

conradc2380_0-1677425271425.png

Again , Everything needs to run from the external clocks , Either TCXO or ECO , This is a pretty serious BUG and a highly limiting situtaion for the project.

A serious look into this is required

Regards

C

0 Likes
conradc2380
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

Hi @Aashita_R 

After a further month of trying to figure out this problem ,I found that in both the CM0 and CM4 the following files need to be added . It's a bit disappointing that the Device configurator setup somehow does not get included in the build process and that these files are needed when anything is changed in the Device configurator .

#include "cycfg.h"

init_cycfg_all();/* Set up the device based on configurator selections */

Regards

Conrad

 

0 Likes