MCF5225x VCOM example doesn't reconnect and hangs

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

MCF5225x VCOM example doesn't reconnect and hangs

527 Views
ARQuattr
Contributor IV

We have a board with an MCF52254 running MQX 4.1 and are having issues with the USB device mode. The design is based on the MCF52259 tower board and very similar with respect to the USB circuitry. We are connecting this board to a tablet in OTG mode and using the CDC class to transfer data between the two devices.

The general problem is that while the first connection after reset works very reliably, if the USB cable is then disconnected and reconnected, the application does not resume communication. In many cases the VCOM task stops, and sometimes all tasks stop working, even higher priority ones.

With the original example VCOM running, after connecting to an app on the Android tablet, the tablet sends data to the device, which echoes it back. This works fine, but when the cable is disconnected and reconnected it doesn't continue.

We also added a very simple second task which periodically reports various flags, like start_app and start_transactions every second, and can see that after the first connection and start_transactions becomes true, it doesn't get reset after disconnecting.

The only difference between the hardware where USB is concerned is the pull-up resistors. These are tied to GPIO on our board and to the dedicated PDOWN pins on the tower board. Is the USB stack controlling those pulldowns automatically, or is that something we would be expected to control at the application level? I don't see the VCOM example app doing anything with those. Besides this, the resistors are both 15k on the tower board (as on our board), my understanding is that one of the lines should be pulled up with 1.5k on the device side. Would these resistors cause the type of behavior we are seeing?

(I have two tower boards and was trying to program them with this app, but I can't seem to get CW to connect by OSBDM. Also very frustrating.)


Thanks,

Angelo

Labels (1)
0 Kudos
1 Reply

330 Views
soledad
NXP Employee
NXP Employee

Hello Angelo,

I want to isolate the issues,

1. You mention that you can't connect CW using OSBDM:

As OSBDM is developed by PE Micro they will provide the newest drivers. You can also find in their web page www.pemicro.com an utility to upgrade OSBDM firmware.

This utility is very easy to use. You can get it in the next link:

http://www.pemicro.com/osbdm/index.cfm

2. The MCF52259 USB OTG module can worked as full speed Host or full speed device. When USB module works as USB HOST mode, need to set OTG Control Register (OTG_CTRL) [DP_LOW] & [DM_LOW] bits to enable D+ and D- pull-down resistors and Control Register (CTL) [HOST_MODE_EN] bit to 1 , enable the USB Module to operate in Host mode.

USB_DP_PDOWM and USB_DM_PDOWM pins are connect with external 15K pull down resistors for USB Host mode.

You need to connect these resistors externally, you cannot control this by software.

3. I tested the example virtual_com located at the path : C:\Freescale\Freescale_MQX_4_1\usb\device\examples\cdc\virtual_com\build\cw10 using a TWR-MCF52259 without issues. So it is probably that there is a hardware issue with the custom board.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos