<?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: iMX DFU USB crashes application (FreeRTOS) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX-DFU-USB-crashes-application-FreeRTOS/m-p/1405859#M186380</link>
    <description>&lt;P&gt;It turned out that the SDK's &lt;STRONG&gt;XIP component&lt;/STRONG&gt; was missing in the project. Now everything is working as expected.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 08:37:23 GMT</pubDate>
    <dc:creator>Michi_O</dc:creator>
    <dc:date>2022-01-27T08:37:23Z</dc:date>
    <item>
      <title>iMX DFU USB crashes application (FreeRTOS)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX-DFU-USB-crashes-application-FreeRTOS/m-p/1404648#M186273</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to get &lt;STRONG&gt;USB DFU (app-idle)&lt;/STRONG&gt; running on an &lt;STRONG&gt;MIMXRT1052DVL6B&lt;/STRONG&gt; with &lt;STRONG&gt;FreeRTOS&lt;/STRONG&gt;. I gathered all resources using the MCUXpresso Config Tool and an example for the RT1064 Evaluation Kit (for the FreeRTOS integration).&lt;BR /&gt;The startup is running until the application crashes inside of &lt;EM&gt;&lt;STRONG&gt;USB1_init()&lt;/STRONG&gt;&lt;/EM&gt;. The last point I can reach with the debugger is a function call to&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;USB_DeviceClassGetDeviceHandle()&lt;/STRONG&gt;&lt;/EM&gt; when a &lt;EM&gt;&lt;STRONG&gt;OSA_ENTER_CRITICAL()&lt;/STRONG&gt;&lt;/EM&gt; section is entered. All parameters and also the disassembly seem valid. However, it should be mentioned that the application also crashes when I set a breakpoint somewhen before the described point and continue running from there.&lt;BR /&gt;Checking the nested interrupts handling (since the issue seems to be caused by&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;OSA_ENTER_CRITICAL&lt;/STRONG&gt;&lt;/EM&gt;) didn't give me a real hint on what is actually happening. I cross-checked the implementation with another working bare-metal example where the main difference is the interrupt disable / enable routines (the BM example doesn't use a nested interrupt protection).&lt;BR /&gt;I tried now to place the initializations before all RTOS code. Before that I had the initializations in an "init task" which destroys itself after the first execution. However, this didn't solve the problem. That's why I don't expect the FreeRTOS to be the direct issue.&lt;BR /&gt;Furthermore I could track down the instruction that is obviously causing the problem: in function&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;USB_DeviceEhciSetDefaultState()&lt;/STRONG&gt;&lt;/EM&gt; [usb_device_ehci.c] the &lt;STRONG&gt;DEVICEADDR&lt;/STRONG&gt; is reset in the USB core memory. Commenting this assignment keeps the app from crashing. However, this instruction shouldn't have any effect, since the &lt;STRONG&gt;DEVICEADDR&lt;/STRONG&gt; register is set to zero after a reset anyway. At this point I would expect some memory alignment issue.&lt;/P&gt;&lt;P&gt;Maybe someone can give some hint on which direction to go from here &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 13:47:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX-DFU-USB-crashes-application-FreeRTOS/m-p/1404648#M186273</guid>
      <dc:creator>Michi_O</dc:creator>
      <dc:date>2022-01-26T13:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: iMX DFU USB crashes application (FreeRTOS)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX-DFU-USB-crashes-application-FreeRTOS/m-p/1405859#M186380</link>
      <description>&lt;P&gt;It turned out that the SDK's &lt;STRONG&gt;XIP component&lt;/STRONG&gt; was missing in the project. Now everything is working as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 08:37:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX-DFU-USB-crashes-application-FreeRTOS/m-p/1405859#M186380</guid>
      <dc:creator>Michi_O</dc:creator>
      <dc:date>2022-01-27T08:37:23Z</dc:date>
    </item>
  </channel>
</rss>

