I have been trying to compile and use the CMX USB generic device on the MC51JM128 demojm board. I simply recompile the software switching the target to to JM processors. The code always fails after running usb_init(); in main. I get a windows message saying the device device not recognized. The code is hung in an an endless loop at the while in the location below:
static void disable_ep_tx(hcc_u8 ep)
{
MCF_USB_ENDPT(ep) &= ~MCF_USB_ENDPT_EP_TX_EN;
while(MCF_USB_ENDPT(ep) & MCF_USB_ENDPT_EP_TX_EN) {
;
WR_LE32(&BDT_CTL_TX(ep, 0), 0);
WR_LE32(&BDT_CTL_TX(ep, 1), 0);
}
Has anyone seen this and can give me some advice on where to look ? The code seems to compile OK. Is there anything else other than change the target that I need to do ?
I have verified everything is working fine on the PC by switching back to the other board and run the sample generic USB app there and that initializes fine and runs fine.
i have the same problem, my test program hangs in the same point (while instruciton), if you have the solution please reply this message ,thanks in advance.
here i have the solution in disable_ep_tx............
hcc_u8 parche;
// the following sentence by this way dosent compile correctly almost under code warrior 5.9
// MCF_USB_ENDPT(ep) &= ~MCF_USB_ENDPT_EP_TX_EN;
parche = MCF_USB_ENDPT(ep);
parche &= ~MCF_USB_ENDPT_EP_TX_EN;
MCF_USB_ENDPT(ep) = parche;
while(MCF_USB_ENDPT(ep) & MCF_USB_ENDPT_EP_TX_EN)
;
WR_LE32(&BDT_CTL_TX(ep, 0), 0);
WR_LE32(&BDT_CTL_TX(ep, 1), 0);