alessandro carozzi

MQX & MCF54418 - USB problem

Discussion created by alessandro carozzi on Mar 28, 2013
Latest reply on Apr 9, 2013 by plim

Hello everybody,

We have developed a board based on a ColdFire MCF54418 (the board is quite similar to the TWR-MCF54418) and we are running some MQX examples to test the board’s peripherals (we are using MQX 3.8.1 and CodeWarrior Classic 7.2). In particular, we have are trying to test the USB I/F, which on our board is just a USB device (the chosen example is the virtual COM port one). The problem is that the code crashes when, in the routine _usb_dci_usbhs_chip_initialize() (in ehci_dev_main.c, the following instruction is executed:


/*--- Intial Configuration ---*/

/* Initialize the endpoint 0 properties */



The problem is, the EHCI_EPCTRL_TX_DATA_TOGGLE_RST (bit 22) and EHCI_EPCTRL_RX_DATA_TOGGLE_RST (bit 6) belong to the Endpoint Control Register 1, not 0 (see MCF54418RM, page 24-44 and 24-45). Instead, in the Endpoint Control Register 0 those bits are reserved and must be cleared, so this would explain the crash (we have verified with the P&E BDM that it is actually the Endpoint Control Register 0 that gets written to).


Two questions:

1) Has anyone tried an MQX USB device example on the TWR-MCF54418 (unfortunately we don’t have this EVB, so we can’t check)?

2) Does anyone have some working USB device code for the MCF54418 or know how to fix the one provided with MQX?


Thank you in advance for your help!