Hello Geeks,
We have a system using MCF54415 and I am intending to use the USB OTG port as Host.
We took the Tower example project for USB Host. But as the Tower board does not use OTG port for USB Host, I need to make some changes.
I made the following changes in twrmcf54418.h :
I have tested it and it is not working (that is why I am here :smileyhappy: ).
So all the brainies out there, please help me fixing the issue. Please let me know what and where more changes are to be made.
Regards,
Nitro
Hi Folks,
I tried to configure the OTG registers to act as a Host. To achieve this, I had changed the reference to structure USBHOST to USBOTG.
But I am still not able to get any activity on the ports.
Below is the current status of the registers :
Register Name | Value |
USB_OTG_ID | 0xe241fa05 |
USB_OTG_HWGENERAL | 0x000007c5 |
USB_OTG_HWHOST | 0x10020001 |
HWDEVICE | 0x00000009 |
USB_OTG_HWTXBUF | 0x80040604 |
USB_OTG_HWRXBUF | 0x00000404 |
GPTIMER0LD | 0x00000000 |
GPTIMER0CTL | 0x00000000 |
GPTIMER1LD | 0x00000000 |
GPTIMER1CTL | 0x00000000 |
USB_OTG_HCIVERSION | 0x0100 |
USB_OTG_CAPLENGTH | 0x40 |
USB_OTG_HCSPARAMS | 0x00010011 |
USB_OTG_HCCPARAMS | 0x00000006 |
DCIVERSION | 0x0000 |
DCCPARAMS | 0x00000184 |
USB_OTG_USBCMD | 0x00010001 |
USB_OTG_USBSTS | 0x00000088 |
USB_OTG_USBINTR | 0x00000037 |
USB_OTG_FRINDEX | 0x00003490 |
DEVICEADDR | 0x00000000 |
USB_OTG_PERIODICLISTBASE | 0x00000000 |
USB_OTG_ASYNCLISTADDR | 0x00000000 |
EPLISTADDR | 0x00000000 |
USB_OTG_TTCTRL | 0x00000000 |
USB_OTG_BURSTSIZE | 0x00001010 |
USB_OTG_TXFILLTUNING | 0x00020000 |
ULPI_VIEWPORT | 0x08000000 |
USB_OTG_CONFIGFLAG | 0x00000001 |
USB_OTG_PORTSC1 | 0xed001c00 |
OTGSC | 0x00203020 |
USB_OTG_USBMODE | 0x00000007 |
EPSETUPSR | 0x00000000 |
EPPRIME | 0x00000000 |
EPFLUSH | 0x00000000 |
EPSR | 0x00000000 |
EPCOMPLETE | 0x00000000 |
EPCR0 | 0x00800080 |
EPCR1 | 0x00000000 |
EPCR2 | 0x00000000 |
EPCR3 | 0x00000000 |
CCR | 0x527f |
RCON | 0x1259 |
CIR | 0x2802 |
MISCCR | 0x2f7c |
CDRH | 0x0101 |
CDRL | 0x0000 |
UOCSR | 0x3810 |
UHCSR | 0x0000 |
MISCCR3 | 0x0000 |
MISCCR2 | 0xa89f |
ADCTSR | 0x0000 |
DACTSR | 0x0000 |
FNACR | 0x00000000 |
Can anyone please point out what am I missing ?
Also, is it even possible to implement a Host on OTG port without ULPI interface ?
Regards,
Nitro
Hi Nitin,
I checked with me experts. It is nos possible to recreate the scenario with our boards. Otherwise we were already able to solve the issue. Having taking a look to your board in our labs is unfortunately not par of our scope as free support for MQX. I am really sorry but it would be necessary to recommend the Level 2 support for MQX. This kind of support is included with this level. For more details you can check this link: Freescale MQX™ Support|Freescale
I am sorry for the inconvenience this may cause you.
Best Regards,
Garabo
Hi Garabo,
Sorry but we cannot afford the Level 2 support.
So I am on my own to get this fixed.
In the pursuit, I have succeeded in getting the Host send SETUP packets.
So, as you can see, there is also SE1 condition between two packets.
Can anyone help me now ?
Thanks !
Hi Nitin,
Let me ask my experts to review and suggest you solutions.
Regards,
Garabo
Hi Garabo,
I appreciate your efforts. It seems that I have fixed the issue and the port is communicating now.
But the MFS is giving me error : MFS_NOT_A_DOS_DISK. Shall I create a new thread for this issue ?
Thanks,
Nitro
Hi Nitin,
Congratulations for solving the problem!
Yes, please help us to create a new thread. If you can add source code or example project that help us to recreate the problem please add it. In advance I can tell you that a FAT16 or FAT32 formatting usually solves this issue.
Regards,
Garabo
Hi Nitin,
I am afraid that USB OTG is not supported in MQX. What is the purpose of your application to use OTG? Sometimes it is confused the USB OTG with USB as device and later USB as Host. If that is your case then what you need is to use a jumper or switch that tells your device when to act as Host or Device.
Regards,
Garabo
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Garabo,
My bad. I did not explain it properly. I am using the USBOTG port as USB Host.
So, I tried with the changes mentioned above but it is not working. Please help me find out what am I missing.
Regards,
Nitro
Hi Nitro,
Just some supplement to Garabo's comment. The MQX's USB stack doesn't support OTG opertaion, but you can use the OTG module on MCF54418 as a dule role USB port. With the following modification, you may get it work as a Host port . I just run the msd command demo on TWR-MCF54418 with TWR-SER2, you may try it as well.
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kan,
Thanks for your time.
I tried with the changes you had mentioned. But the BSP settings mentioned above are not applicable to my setup, hence it did not work. :smileysad:
In my system, there is no ULPI interfaces. I am trying to use the OTG port directly to act as a host.
Kindly see the diagram of my setup.
Please let me know what else shall I change.
Thank you again.
Nitro