<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Pointer alignment error in MCUXpresso SDK</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029118#M2191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Konstandin,&lt;/P&gt;&lt;P&gt;The write buffer is transfer from application level and it is not checked by any level. Although there is no word in RM say DMA is word alignment, USB driver defined read buffer as 4 byte alignment. I'll make further test and report this problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot！&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2020 17:32:42 GMT</pubDate>
    <dc:creator>jingpan</dc:creator>
    <dc:date>2020-02-06T17:32:42Z</dc:date>
    <item>
      <title>Pointer alignment error</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029117#M2190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alignment error in "serial_port_usb.с"&amp;nbsp; SDK_2.7.0_FRDMK64&lt;BR /&gt;A project was created on the basis of two projects "hello_word_virtual_port" and the project "shell".&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Example.png"&gt;&lt;IMG alt="Example.png" src="https://community.nxp.com/t5/image/serverpage/image-id/100489iB4093E96D8E8B500/image-size/large?v=v2&amp;amp;px=999" title="Example.png" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;When the project was launched, the output of non-correct data to the console occurred.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Error.png"&gt;&lt;IMG alt="Error.png" src="https://community.nxp.com/t5/image/serverpage/image-id/100533iA3F7AF3E084F4D7C/image-size/large?v=v2&amp;amp;px=999" title="Error.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The problem is alignment of the pointer to the output.&lt;BR /&gt;I solved the problem using an intermediate buffer aligned.&lt;/P&gt;&lt;P&gt;line 862&amp;nbsp; file&amp;nbsp;&lt;SPAN&gt;serial_port_usb.с&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (needToPrime)&lt;BR /&gt; {&lt;BR /&gt; if (kStatus_USB_Success !=&lt;BR /&gt; USB_DeviceCdcAcmSend(serialUsbCdc-&amp;gt;cdcAcmHandle, USB_CDC_VCOM_BULK_IN_ENDPOINT, buffer, length))&lt;BR /&gt; {&lt;BR /&gt; serialUsbCdc-&amp;gt;tx.busy = 0;&lt;BR /&gt; return kStatus_SerialManager_Error;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;change to&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if (needToPrime)
 {
 USB_DMA_NONINIT_DATA_ALIGN(USB_DATA_ALIGN_SIZE) static uint8_t s_currSendBuf[DATA_BUFF_SIZE];
 memcpy(s_currSendBuf, buffer, length);
 if (kStatus_USB_Success !=
 USB_DeviceCdcAcmSend(serialUsbCdc-&amp;gt;cdcAcmHandle, USB_CDC_VCOM_BULK_IN_ENDPOINT, s_currSendBuf, length))
 {
 serialUsbCdc-&amp;gt;tx.busy = 0;
 return kStatus_SerialManager_Error;
 }
 }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:36:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029117#M2190</guid>
      <dc:creator>PitOn</dc:creator>
      <dc:date>2020-11-02T14:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pointer alignment error</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029118#M2191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Konstandin,&lt;/P&gt;&lt;P&gt;The write buffer is transfer from application level and it is not checked by any level. Although there is no word in RM say DMA is word alignment, USB driver defined read buffer as 4 byte alignment. I'll make further test and report this problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot！&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 17:32:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029118#M2191</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2020-02-06T17:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pointer alignment error</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029119#M2192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jing !&lt;/P&gt;&lt;P&gt;Here I do not agree with you.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;RM....&amp;nbsp;&lt;/SPAN&gt;Paragraph&amp;nbsp;46.3.3 Addressing BDT entries.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;To compute the entry point into the BDT, the BDT_PAGE registers are concatenated&lt;BR /&gt;with the current endpoint and the TX and ODD fields to form a 32-bit address.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Konstfntin/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 21:36:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029119#M2192</guid>
      <dc:creator>PitOn</dc:creator>
      <dc:date>2020-02-06T21:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Pointer alignment error</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029120#M2193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;But BDT_PAGE register point to the starting location of the BDT, not point to data buffer. ADDR[31:0] field point to the data buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 16:51:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Pointer-alignment-error/m-p/1029120#M2193</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2020-02-07T16:51:01Z</dc:date>
    </item>
  </channel>
</rss>

