USB will not enumerate

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

USB will not enumerate

8,577 Views
aune
Contributor III

I managed to get the PLL up and running with external crystal, generating PLLclk = 48Mhz, which is feed to USB through MCGPLLCLK ( PLLFLLSEL = 1).

Core runs at 48Mhz, bus, flash and flexbus runs at 24Mhz.

I have verified the frequencies on PTC3.

When I connect the USB cable the software makes transition som BLPE/VLPR -> RUN/PEE, after this is verified and done the USB starts up. But for some reason the computer will not recognize the device. If I plug into a win7 computer it said that it "failed to get device description".

But if I break the software I can see that I do get a token from the computer with device descriptor request and it the protocol stack ( Freescale 4.1.1 ) breaks at the usb_descriptor.c file where it does get the descriptor, the protocol stack flags no errors.

Btw, I also tried running of IRC48, with same result.

Any idea why the computer won't recognize it ?

0 Kudos
Reply
24 Replies

909 Views
aune
Contributor III

No the software does not get stuck in any infitite loop, it runs "normally" when USB is connected.

I already have heap allocated for other parts of the project, have tried to increate this as well without any success.

Using freeScale 4.1.1 stack

0 Kudos
Reply

909 Views
mjbcswitzerland
Specialist V

Hi

What does your USB analyser show you being returned on the bus?

If the descriptor size is correct but its content is bad you probably need to configure FMC_PFAPR to give the USB controller access rights to flash memory (where the decriptors are probably resident). Probably the old USB stack that you are using is not device aware and so doesn't configure all things that are needed.

Regards

Mark

0 Kudos
Reply

909 Views
aune
Contributor III

I will try using a USB analyzer tomorrow when I get back in the office and let you know the result.

The descriptors are all initialized as const so they are located flash.

I looked at the FMC_PFAPR register, but this only says master1-7 etc, is there any overview where the different masters are selected ?

0 Kudos
Reply

909 Views
mjbcswitzerland
Specialist V

pastedImage_0.png

0 Kudos
Reply