John fsprogrammer

CMX USB Stack - MC51JM128

Discussion created by John fsprogrammer on Apr 8, 2010
Latest reply on Mar 2, 2012 by peter quirch

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.

Outcomes