<?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>Keil RL - USB CDC</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/32870/keil-rl---usb-cdc</link><description> 
Hello, 

 
i have two absolute identical applications except the controller
because currently i have to change it. 

 
The first application is already running. It is an LPC1778 with
Keil RTX and Keil USB CDC device only. I use the Keil USB_CM3.lib</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Keil RL - USB CDC</title><link>https://community.arm.com/thread/140908?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 22:27:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:407fed36-f75c-4be1-9f84-773060230a9e</guid><dc:creator>T H</dc:creator><description>&lt;p&gt;&lt;p&gt;
Oh yeah, that&amp;acute;s right.&lt;br /&gt;
I am embarrassed. I should know that.&lt;/p&gt;

&lt;p&gt;
Unfortunately i still don&amp;acute;t know why the behaviour of the
two USB drivers are not the same.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil RL - USB CDC</title><link>https://community.arm.com/thread/137290?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 08:25:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:67cf24d9-58ff-4760-9362-9ab9c9ef5d14</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
I don&amp;#39;t work with your processor, and haven&amp;#39;t looked at the actual
register definitions.&lt;/p&gt;

&lt;p&gt;
But note that an offset number of 8 may end up being a byte offset
of 0x20 (=32) if the pointer points to an object of size 4, like a
32-bit integer.&lt;/p&gt;

&lt;pre&gt;
#define DIEPTSIZ(EPNum) *(&amp;amp;OTG-&amp;gt;DIEPTSIZ0 + EPNum * 8)
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
-&amp;gt; has higher precedence than &amp;amp;&lt;br /&gt;
so the above is the same as:&lt;/p&gt;

&lt;pre&gt;
#define DIEPTSIZ(EPNum) *(&amp;amp;(OTG-&amp;gt;DIEPTSIZ0) + EPNum * 8)
&lt;/pre&gt;

&lt;p&gt;
And if DIEPTSIZ0 is a 32-bit integer, then you get a pointer where
EPNum*8 will step 32 byte per step of EPNum.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil RL - USB CDC</title><link>https://community.arm.com/thread/129097?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 08:06:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:877adc8d-f743-4f7f-be52-0295525b0d13</guid><dc:creator>T H</dc:creator><description>&lt;p&gt;&lt;p&gt;
Is it possible that there are some mistakes in the Keil
usbd_STM32F4xx_FS.c file ?&lt;/p&gt;

&lt;p&gt;
#define DIEPTSIZ(EPNum) *(&amp;amp;OTG-&amp;gt;DIEPTSIZ0 + EPNum * 8)&lt;br /&gt;
#define DIEPCTL(EPNum) *(&amp;amp;OTG-&amp;gt;DIEPCTL0 + EPNum * 8)&lt;br /&gt;
#define DTXFSTS(EPNum) *(&amp;amp;OTG-&amp;gt;DTXFSTS0 + EPNum * 8)&lt;br /&gt;
#define DOEPTSIZ(EPNum) *(&amp;amp;OTG-&amp;gt;DOEPTSIZ0 + EPNum * 8)&lt;br /&gt;
#define DOEPCTL(EPNum) *(&amp;amp;OTG-&amp;gt;DOEPCTL0 + EPNum * 8)&lt;br /&gt;
#define DIEPINT(EPNum) *(&amp;amp;OTG-&amp;gt;DIEPINT0 + EPNum * 8)&lt;br /&gt;
#define DOEPINT(EPNum) *(&amp;amp;OTG-&amp;gt;DOEPINT0 + EPNum * 8)&lt;/p&gt;

&lt;p&gt;
I guess the defines are not correct.&lt;br /&gt;
For example:&lt;/p&gt;

&lt;p&gt;
DOEPINT from Endpoint0 is correct because OTG-&amp;gt;DOEPINT0 + EPNum
* 0 = the correct register value from DOEPINT0. But all the other
addresses are wrong.&lt;br /&gt;
Because : OTG-&amp;gt;DOEPINT0 + 1 * 8 for endpoint 1 is not the correct
address from the DOEPINT1 register. It should be OTG-&amp;gt;DOEPINT0 +
EPNum * 0x20&lt;/p&gt;

&lt;p&gt;
Correct me please if i am wrong.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil RL - USB CDC</title><link>https://community.arm.com/thread/117923?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 00:27:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:01095642-d6f7-408e-935c-bb4847f22bde</guid><dc:creator>T H</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you for the advice.&lt;/p&gt;

&lt;p&gt;
I already checked the example a few days ago. The USB files are
identical and my settings too.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil RL - USB CDC</title><link>https://community.arm.com/thread/108554?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 00:23:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d00a673c-09db-4e1e-9e0a-6558a9cd4f79</guid><dc:creator>Milorad Cvjetkovic</dc:creator><description>&lt;p&gt;&lt;p&gt;
You can use \ARM\Boards\Keil\MCBSTM32F400\RL\USB\Device\CDC_ACM\ 
as a reference&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil RL - USB CDC</title><link>https://community.arm.com/thread/82932?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 00:15:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ff89fb03-619e-45ed-bee9-404397e0385e</guid><dc:creator>T H</dc:creator><description>&lt;p&gt;&lt;p&gt;
I used Keil MDK4 for both applications&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keil RL - USB CDC</title><link>https://community.arm.com/thread/64325?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 00:13:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b1ed5811-f5e4-4a86-a440-8dbaf4d709d2</guid><dc:creator>Milorad Cvjetkovic</dc:creator><description>&lt;p&gt;&lt;p&gt;
I suggest you try latest MDK and middleware.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>