<?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>USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/29080/usb-host-hid-keyboard-on-lpc2362</link><description> 
Hello, 
I want to make a USB-Host work on the LPC2362. Therefore, I found
Sample Code for the LPC2388(in the MCB2300-folder, refer to 
 www.keil.com/.../rlarm_usb_host_hid_kbd.htm )
that provides a Host for a HID (Keyboard). I sligthly adapted it to</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/thread/140220?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2012 06:21:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5ca29a99-4106-4a11-9155-501ea3531fea</guid><dc:creator>Carolina Ruiz</dc:creator><description>&lt;p&gt;&lt;p&gt;
Tsuneo,&lt;/p&gt;

&lt;p&gt;
Thank you for your reply.&lt;br /&gt;
For some reason my application is still not working.&lt;br /&gt;
The LM3526-L IC (overcurrent monitor)Pin-1 when I start the
application is LOW which is okay so that the USB in powered, but as
soon as I connect the USB device (keyboard) goes HIGH and stays
HIGH.&lt;/p&gt;

&lt;p&gt;
I am using the Keil USB library and unfortunately I do not have a
way to monitor the state of those pins.&lt;/p&gt;

&lt;p&gt;
Please let me know if you have any ideas.&lt;/p&gt;

&lt;p&gt;
Thanks again,&lt;/p&gt;

&lt;p&gt;
Carolina&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/thread/136748?ContentTypeID=1</link><pubDate>Thu, 19 Jul 2012 19:31:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:513e26ba-4859-4a6f-95ff-60179a2ef99e</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;gt; USBPortSel |= ~0x03;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
It is,&lt;br /&gt;
USBPortSel |= 0x03; // PORT_FUNC = 11b&lt;/p&gt;

&lt;p&gt;
As of PORT_FUNC bits of USBPortSel (identical to OTGStCtrl), refer
to&lt;br /&gt;
&amp;quot;Table 336. Port function truth table&amp;quot; of the User manual.&lt;br /&gt;
&lt;a href="http://www.nxp.com/documents/user_manual/UM10211.pdf"&gt;www.nxp.com/.../UM10211.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/thread/85245?ContentTypeID=1</link><pubDate>Thu, 19 Jul 2012 10:22:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:432b5ff8-3486-49a6-9efe-ba0b0366e2c8</guid><dc:creator>Carolina Ruiz</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello Stefan,&lt;/p&gt;

&lt;p&gt;
Thank you very much for the valuable information. I wish I had
found it earlier.&lt;br /&gt;
Are those all the modifications that you made? because I did exactly
what you said and for some reason it is not working.&lt;/p&gt;

&lt;p&gt;
In the usbh_ohci_lpc23xx.c file I made the following mods.:&lt;br /&gt;
1. #define USBH_OHCI_PORTS 0x00000001&lt;br /&gt;
2. Added the same PINSELs that you have&lt;br /&gt;
3. Changed the USBPortSel to USBPortSel |= ~0x03;(I thought you only
had to do it for the LPC2378 according to the User&amp;#39;s Manual)&lt;/p&gt;

&lt;p&gt;
Am I missing something?&lt;/p&gt;

&lt;p&gt;
Carolina&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/thread/85196?ContentTypeID=1</link><pubDate>Fri, 20 Apr 2012 07:30:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9491b42c-5ad0-41e6-92e6-f37f8994cac9</guid><dc:creator>Stefan G</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi again,&lt;br /&gt;
I resolved the issue now. Here&amp;#39;s the summary:&lt;/p&gt;

&lt;p&gt;
Adaptation of USB-Host-Sample-Code for LPC2388 (USB-Host Keyboard)
to LPC2362. You must only adapt the file usbh_ohci_lpc23xx.c:&lt;br /&gt;
in the configuration Wizard, change to Port1&lt;br /&gt;
Adapt PINSEL to your needs (see below).&lt;br /&gt;
in usb_ohci_hw_init(Bool on), instead of writing USBPortSel &amp;amp;=
~0x01; write instead USBPortSel |= ~0x03; (this one was cryptical to
me, so I didn&amp;#39;t do it correctly in the beginning)&lt;/p&gt;

&lt;p&gt;
Hope this can help someone.&lt;br /&gt;
Stefan&lt;/p&gt;

&lt;p&gt;
****************&lt;br /&gt;
Pinsel for USB-Host on LPC2362:&lt;/p&gt;

&lt;p&gt;
PINSEL1 &amp;amp;= ~((3 &amp;lt;&amp;lt; 26));&lt;br /&gt;
PINSEL1 |= ((1 &amp;lt;&amp;lt; 26)); /* P0.29 - USB_D+1 */&lt;br /&gt;
PINSEL1 &amp;amp;= ~((3 &amp;lt;&amp;lt; 28));&lt;br /&gt;
PINSEL1 |= ((1 &amp;lt;&amp;lt; 28)); /* P0.30 - USB_D-1 */&lt;/p&gt;

&lt;p&gt;
PINSEL3 &amp;amp;= ~((3 &amp;lt;&amp;lt; 22));&lt;br /&gt;
PINSEL3 |= ((2 &amp;lt;&amp;lt; 22)); /* P1.27 - ~USB_nOVRCR1 */&lt;/p&gt;

&lt;p&gt;
PINSEL3 &amp;amp;= ~(3 &amp;lt;&amp;lt; 12);&lt;br /&gt;
PINSEL3 |= (2 &amp;lt;&amp;lt; 12); /* P1.22 - USB_PWRD1 */&lt;/p&gt;

&lt;p&gt;
/*optional outputs also configured*/&lt;br /&gt;
PINSEL3 &amp;amp;= ~(3 &amp;lt;&amp;lt; 4);&lt;br /&gt;
PINSEL3 |= (1 &amp;lt;&amp;lt; 4); /* P1.18 - USB-UP-LED1 */&lt;br /&gt;
PINSEL3 &amp;amp;= ~(3 &amp;lt;&amp;lt; 6);&lt;br /&gt;
PINSEL3 |= (2 &amp;lt;&amp;lt; 6); /* P1.19 - USB-nPPWR1 */&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/thread/84791?ContentTypeID=1</link><pubDate>Mon, 16 Apr 2012 02:02:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:19a67092-b597-494b-a0f0-2319e8da9171</guid><dc:creator>Stefan G</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi!&lt;br /&gt;
I tried this change on my hardware, but I couldn&amp;#39;t get the USB-Host
work on the LPC2362.&lt;br /&gt;
When I use the function usb_hid_get_last_error(0,0), I see that the
error is &amp;quot;ERROR_USBH_HID&amp;quot;.&lt;br /&gt;
Do you know whether there are other adaptions for the LPC2362, or
whether there is some USB-Host example directly for this
&amp;micro;C?&lt;br /&gt;
Do I need to adapt the &amp;quot;Start address of memory used by OHCI&amp;quot;? I do
not know its significance. I am still learning about the host...&lt;br /&gt;
Thanks in advance!&lt;br /&gt;
Regards,&lt;br /&gt;
Stefan&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/thread/80168?ContentTypeID=1</link><pubDate>Fri, 06 Apr 2012 21:24:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e4956f28-735d-4261-89be-2266f93a0d9b</guid><dc:creator>Stefan G</dc:creator><description>&lt;p&gt;&lt;p&gt;
I didn&amp;#39;t change this define. I will try when I have acces to the
board again. Thanks a lot!!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Host (HID-Keyboard) on LPC2362</title><link>https://community.arm.com/thread/60604?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2012 21:21:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:51215460-08a1-449d-b3dd-3698a5199934</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;pre&gt;
usbh_ohci_lpc23xx.c

#define USBH_OHCI_PORTS             0x00000002   // &amp;lt;-- 0x00000001 // port 1
&lt;/pre&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>