USB Device Driver for Keil RTX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB Device Driver for Keil RTX

692 Views
JonathanUI
Contributor I

Has anyone gotten the USB Device library within Keil's RTX to work?  It works for my TWR-K60N512 but not my TWR-K60F120M.  I know some changes were made to USB registers between those two processors, but I'm not sure where to start, especially given that Keil does not give out their USB Device Stack code.

 

Thanks,

Jonathan

0 Kudos
2 Replies

351 Views
mjbcswitzerland
Specialist V

Jonathan

 

There is very little difference between the USB in the two devices. Where you however need to check is that the USB clock is being correctly set to 48MHz - the PLL in the 120MHz device is different and needs a different calculation to do this. Furthermore there are more clock sources in the 120MHz version and so the correct one has to be selected in SIM_SOPT2 which has additional selection bits to the same register to the 100MHz parts.

 

Regards

 

Mark

 

0 Kudos

351 Views
JonathanUI
Contributor I

Thank you.  I checked all the SIM_SOPT2 and SIM_CLKDIV2 settings and updated them as needed.  The interrupt fires once for USB reset, then a second time for a suspend interrupt, then another reset intrrupt, then a Start of Frame interrupt, but a token reception interrupt is never triggered.  An error interrupt is never triggered either.

 

Any ideas on what might cause this or how I could debug this?

 

Thanks,

Jonathan

0 Kudos