I am using a custom board with the MK60DX256VLL10 running at 96 MHz. The bareboard projects are built using CodeWarrior 11.0 and Processor Expert's USB_LDD component. I have tried two different projects: one is a CDC serial port, the other is a USB mass storage device. The issue that I have is that both work correctly without any issues when I build for RAM and execute them using the debugger. If I build (the exact same code) for flash and execute from the flash the enumeration process proceeds to the point where the PC sends the first setup packet for GET_DEVICE_DESCRIPTOR. There is no response from our board and usbtrace shows a USBD_STATUS_XACT_ERROR(0xC0000011) on the PC side.
Any ideas on what the problem could be? Has this Processor Expert code ever been tested as a FLASH build on a similar processor/speed?
One other note, I have enabled the OnDeviceError event and never see any errors as far as the USB_LDD component is concerned.
Solved! Go to Solution.
Hi George
You can get bullet-proof (industrial quality) USB-CDC for the K60 at
http://www.utasker.com/kinetis/TWR-K60D100M.html
http://www.utasker.com/kinetis/TWR-K60N512.html
(use the free open source version if you don't require any support)
Otherwise try setting the USB bus master's flash access rights since the examples may restrict to RAM operation for some accesses (like descriptors). For the K60 this is using
FMC_PFAPR |= FMC_PFAPR_M4AP_RD;
for the 100MHz K60 or
FMC_PFAPR |= FMC_PFAPR_M3AP_RD;
if it is a version with FPU.
Regards
Mark
That was indeed the problem and now everything is working correctly. A big thank you to Mark Butcher and Fang Li for your expertise and assistance.
Hello,
Well, the problem here is the access to flash. The Flash Memory Controller (FMC) protects master USB FS/LS port to access to flash in its default mode, So you should set the USB bus master's flash access rights as Mark mentioned.
Hi George
You can get bullet-proof (industrial quality) USB-CDC for the K60 at
http://www.utasker.com/kinetis/TWR-K60D100M.html
http://www.utasker.com/kinetis/TWR-K60N512.html
(use the free open source version if you don't require any support)
Otherwise try setting the USB bus master's flash access rights since the examples may restrict to RAM operation for some accesses (like descriptors). For the K60 this is using
FMC_PFAPR |= FMC_PFAPR_M4AP_RD;
for the 100MHz K60 or
FMC_PFAPR |= FMC_PFAPR_M3AP_RD;
if it is a version with FPU.
Regards
Mark