<?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: RT1020-EVK: FreeRTOS + USB + SDRAM = HardFault in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1020-EVK-FreeRTOS-USB-SDRAM-HardFault/m-p/927369#M3739</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I reviewed all the preprocessor defines from the '&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;lwip_httpscli_mbedTLS_freertos'&lt;/SPAN&gt;&amp;nbsp;example again. I am currently able to debug using this set, and change memory at SDRAM (addresses over 0x80000000). It seems that those in bold&amp;nbsp;are mandatory. I do not have to use a custom .scp script anymore.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;USB_STACK_FREERTOS&lt;BR /&gt;&lt;STRONG&gt;SKIP_SYSCLK_INIT&lt;/STRONG&gt;&lt;BR /&gt;LWIP_DNS=1&lt;BR /&gt;&lt;STRONG&gt;XIP_BOOT_HEADER_ENABLE=1&lt;/STRONG&gt;&lt;BR /&gt;USB_STACK_FREERTOS_HEAP_SIZE=32768&lt;BR /&gt;FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE&lt;BR /&gt;LWIP_DHCP=1&lt;BR /&gt;&lt;STRONG&gt;XIP_BOOT_HEADER_DCD_ENABLE=1&lt;/STRONG&gt;&lt;BR /&gt;USE_RTOS&lt;BR /&gt;__REDLIB__&lt;BR /&gt;CPU_MIMXRT1021DAG5A&lt;BR /&gt;CPU_MIMXRT1021DAG5A_cm7&lt;BR /&gt;SDK_DEBUGCONSOLE=0&lt;BR /&gt;CR_INTEGER_PRINTF&lt;BR /&gt;PRINTF_FLOAT_ENABLE=0&lt;BR /&gt;XIP_EXTERNAL_FLASH=1&lt;BR /&gt;FSL_RTOS_FREE_RTOS&lt;BR /&gt;SDK_OS_FREE_RTOS&lt;BR /&gt;__MCUXPRESSO&lt;BR /&gt;__USE_CMSIS&lt;BR /&gt;DEBUG&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In this thread, a similar issue with SKIP_SYSCLK_INIT is discussed:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/474672"&gt;iMXRT1050-EVKB runtime difficulties with project based on EVKB SDK v2.3.1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My memory details are&amp;nbsp;quite standard:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/87916i8203273D733A233D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Linker script settings have the BOARD_SDRAM_NONCACHEABLE extra section.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/87955iA015121965C96B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_8.png" alt="pastedImage_8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Sep 2019 11:05:17 GMT</pubDate>
    <dc:creator>edv1111</dc:creator>
    <dc:date>2019-09-02T11:05:17Z</dc:date>
    <item>
      <title>RT1020-EVK: FreeRTOS + USB + SDRAM = HardFault</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1020-EVK-FreeRTOS-USB-SDRAM-HardFault/m-p/927368#M3738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to setup a MIMXRT1020-EVK project using MCUXpresso and SDK-2.6.1. I want to use SDRAM since my project will use large amounts of memory. The RAM usage is already quite high when I add LWIP and USB stacks to the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only working example with SDRAM I found is 'lwip_httpscli_mbedTLS_freertos' which seems to include the correct implementation of SDRAM, however I had to modify the .scp connect script to include memory initialization routines for it to start debugging at all (POKE32 &amp;amp; PEEK32 commands, to correspond to what is done in this SDRAM driver (Edit: Correction: from dcd_data in evkmimxrt1020_sdram_ini_dcd.c) or else it goes to Hard Fault upon debug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With USB stack, the situation gets more problematic. I tried to accommodate USB to no avail. There was a similar issue in early 2019 with RT1050 and the older SDK 2.5.x that was discussed here &lt;A href="https://community.nxp.com/thread/497440" target="test_blank"&gt;https://community.nxp.com/thread/497440&lt;/A&gt;&lt;BR /&gt;Preprocessor defines added as per the recommendations in the last post:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;BR /&gt;SKIP_SYSCLK_INIT&lt;BR /&gt;XIP_BOOT_HEADER_DCD_ENABLE=1&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;BOARD_SDRAM and BOARD_SDRAM_NONCACHEABLE are listed first and split 30MB : 2MB as described in that thread.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;FreeRTOSConfig.h is also the same as in the &lt;SPAN&gt;'lwip_httpscli_mbedTLS_freertos'&amp;nbsp;example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get HardFaults whenever I try to use USB stack in the project that has the SDRAM setup. It does not seem to enter the main loop; at times it is stuck in SystemInit() on SystemInitHook(), and sometimes goes to 0x0 with INVSTATE Hard Fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What else do I need for RT1020 + FreeRTOS + USB to work with SDRAM? This use case seems to be quite obscure, as there are user manuals for each of these separately, but I found none that would mention these concepts together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2019 14:17:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1020-EVK-FreeRTOS-USB-SDRAM-HardFault/m-p/927368#M3738</guid>
      <dc:creator>edv1111</dc:creator>
      <dc:date>2019-08-30T14:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: RT1020-EVK: FreeRTOS + USB + SDRAM = HardFault</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1020-EVK-FreeRTOS-USB-SDRAM-HardFault/m-p/927369#M3739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I reviewed all the preprocessor defines from the '&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;lwip_httpscli_mbedTLS_freertos'&lt;/SPAN&gt;&amp;nbsp;example again. I am currently able to debug using this set, and change memory at SDRAM (addresses over 0x80000000). It seems that those in bold&amp;nbsp;are mandatory. I do not have to use a custom .scp script anymore.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;USB_STACK_FREERTOS&lt;BR /&gt;&lt;STRONG&gt;SKIP_SYSCLK_INIT&lt;/STRONG&gt;&lt;BR /&gt;LWIP_DNS=1&lt;BR /&gt;&lt;STRONG&gt;XIP_BOOT_HEADER_ENABLE=1&lt;/STRONG&gt;&lt;BR /&gt;USB_STACK_FREERTOS_HEAP_SIZE=32768&lt;BR /&gt;FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE&lt;BR /&gt;LWIP_DHCP=1&lt;BR /&gt;&lt;STRONG&gt;XIP_BOOT_HEADER_DCD_ENABLE=1&lt;/STRONG&gt;&lt;BR /&gt;USE_RTOS&lt;BR /&gt;__REDLIB__&lt;BR /&gt;CPU_MIMXRT1021DAG5A&lt;BR /&gt;CPU_MIMXRT1021DAG5A_cm7&lt;BR /&gt;SDK_DEBUGCONSOLE=0&lt;BR /&gt;CR_INTEGER_PRINTF&lt;BR /&gt;PRINTF_FLOAT_ENABLE=0&lt;BR /&gt;XIP_EXTERNAL_FLASH=1&lt;BR /&gt;FSL_RTOS_FREE_RTOS&lt;BR /&gt;SDK_OS_FREE_RTOS&lt;BR /&gt;__MCUXPRESSO&lt;BR /&gt;__USE_CMSIS&lt;BR /&gt;DEBUG&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In this thread, a similar issue with SKIP_SYSCLK_INIT is discussed:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/474672"&gt;iMXRT1050-EVKB runtime difficulties with project based on EVKB SDK v2.3.1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My memory details are&amp;nbsp;quite standard:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/87916i8203273D733A233D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Linker script settings have the BOARD_SDRAM_NONCACHEABLE extra section.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/87955iA015121965C96B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_8.png" alt="pastedImage_8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 11:05:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1020-EVK-FreeRTOS-USB-SDRAM-HardFault/m-p/927369#M3739</guid>
      <dc:creator>edv1111</dc:creator>
      <dc:date>2019-09-02T11:05:17Z</dc:date>
    </item>
  </channel>
</rss>

