<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>OTG support on USB_CM3_L.lib</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/32735/otg-support-on-usb_cm3_l-lib</link><description> 
Hi, 

 
I&amp;#39;m working with MCB4300 eval board using MDK 4 and trying to
operate the OTG supplement on USB0. 
Is there a specific support for OTG in case I&amp;#39;m using the USB library
given by keil ( V4.60 )? 
Does anyone have a good code example demonstrating</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: OTG support on USB_CM3_L.lib</title><link>https://community.arm.com/thread/131486?ContentTypeID=1</link><pubDate>Thu, 26 Feb 2015 00:37:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b14bfa3e-7105-436a-a643-d9c900fe499d</guid><dc:creator>Idan BA</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks! you&amp;#39;ve helped a lot clearing some things up.&lt;/p&gt;

&lt;p&gt;
BTW, I meant example code for SRP &amp;amp; HNP.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTG support on USB_CM3_L.lib</title><link>https://community.arm.com/thread/128843?ContentTypeID=1</link><pubDate>Thu, 26 Feb 2015 00:27:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dcba3ff5-2993-4da4-a849-d08c94952496</guid><dc:creator>wild (1);</dc:creator><description>&lt;p&gt;&lt;p&gt;
Well, for ID pin you could initialize device as Peripheral when it
is powered on, ID pin should have a pull-up enabled and when micro-A
plug is connected it will pull ID pin low and that should generate an
interrupt preferably and at that time you would uninitialize
Peripheral and initialize Host until disconnect is signaled on port
your device is Host unless you implement HNP and enable your Host to
become Peripheral.&lt;/p&gt;

&lt;p&gt;
&amp;gt; Is this not a must to support the HNP &amp;amp; SRP protocols
using software?&lt;br /&gt;
This is really not clear to me, aren&amp;#39;t most of microcontroller
actions determined by software?&lt;/p&gt;

&lt;p&gt;
I do not have sample code but generally if you want to use Host
you would call something like: usbh_init or USBH_Initialize&lt;/p&gt;

&lt;p&gt;
if you want to use Peripheral you would call something like:
usbd_init or USBD_Initialize followed by usbd_connect(true) or
USBD_Connect&lt;/p&gt;

&lt;p&gt;
if you want to switch to Peripheral from Host you would do
something like: usbh_uninit or USBH_Uninitialize followed by
usbd_init or USBD_Initialize followed by usbd_connect(true) or
USBD_Connect&lt;/p&gt;

&lt;p&gt;
if you want to switch to Host from Peripheral you would do
something like: usbd_connect(false) or USBD_Disconnect usbd_uninit or
USBD_Uninitialize followed by usbh_init or USBH_Initialize followed
by&lt;/p&gt;

&lt;p&gt;
&amp;gt; Do you know if OTG is supported in a newer keil version say
MDK5 ( USB Component V6.0 and&lt;br /&gt;
&amp;gt; above ) ?&lt;br /&gt;
You should ask Keil support for that.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTG support on USB_CM3_L.lib</title><link>https://community.arm.com/thread/117732?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2015 23:52:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:18986f32-e038-4f8a-9d95-dd3e6d2537d2</guid><dc:creator>Idan BA</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes. I&amp;#39;m familiar with this ID pin but don&amp;#39;t know exactly when do
I need to check it out during enumeration process...?&lt;/p&gt;

&lt;p&gt;
Is this not a must to support the HNP &amp;amp; SRP protocols using
software?&lt;/p&gt;

&lt;p&gt;
Do you maybe have a code example for switching the roles?&lt;/p&gt;

&lt;p&gt;
Do you know if OTG is supported in a newer keil version say MDK5 (
USB Component V6.0 and above ) ?&lt;/p&gt;

&lt;p&gt;
Thanks for all the help!&lt;/p&gt;

&lt;p&gt;
Idan&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTG support on USB_CM3_L.lib</title><link>https://community.arm.com/thread/84932?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2015 23:34:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a76a67b0-d4bf-4dc5-aa18-c1dafe13490d</guid><dc:creator>wild (1);</dc:creator><description>&lt;p&gt;&lt;p&gt;
You could do it manually at the moment meaning you look at the ID
pin on the OTG connector and if it is pulled down then you initialize
your device as Host otherwise it as Peripheral, that way it would
allow you to change roles by connecting different micro plug, micro-A
plug internally has ID pin connected to GND so plugging in a micro-A
plug would make your device Host and micro-B plug would make your
device Peripheral.&lt;/p&gt;

&lt;p&gt;
Additional capability of the OTG is to switch roles by software
but this you would have to implement yourself if necessary.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTG support on USB_CM3_L.lib</title><link>https://community.arm.com/thread/82429?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2015 23:22:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7f078068-d5a0-476a-8d58-da9d324ccc04</guid><dc:creator>Idan BA</dc:creator><description>&lt;p&gt;&lt;p&gt;
I&amp;#39;d like to develop a device which using OTG will recognize if I&amp;#39;m
a host or a device.&lt;br /&gt;
If I&amp;#39;m a host, depending the device just enumerated, I&amp;#39;ll decide to
be a CDC or a mass storage host.&lt;br /&gt;
If I&amp;#39;m a device, I&amp;#39;d like to be a CDC device.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTG support on USB_CM3_L.lib</title><link>https://community.arm.com/thread/63496?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2015 22:58:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:380b15cd-37e6-41bf-a514-04365078e21c</guid><dc:creator>Milorad Cvjetkovic</dc:creator><description>&lt;p&gt;&lt;p&gt;
There is documentation regarding OTG on usb.org (&lt;a href="http://www.usb.org/developers/onthego/"&gt;www.usb.org/.../&lt;/a&gt;)
and this is main source of OTG information.&lt;/p&gt;

&lt;p&gt;
What type of device do you want to develop so that you need OTG
support?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>