<?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: Flash Issue in FreeRTOS Application , Unable to Read the Data from  the Flash After a soft reset in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1729932#M15723</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;There should be a newer version of the QN9090 SDK, you can download the latest version from the &lt;A href="https://mcuxpresso.nxp.com/en/select" target="_blank"&gt;MCUXpresso SDK Builder&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Have you tested the driver_examples &amp;gt; flash_demo without modifications? Do you observe the same behavior described in this post? Please, compare your read/write procedure with the one from the flash_demo application.&lt;/P&gt;
&lt;P&gt;By any chance, is gAppUseNvm_d set to 1 in app_preinclude.h file?&lt;/P&gt;
&lt;P&gt;Also, could you try the same procedure using another demo application from the SDK without BLE functionality as base?&lt;/P&gt;
&lt;P&gt;As another test, you could try writing to another address outside the NVM region. Please, take a look at the src &amp;gt; connectivity.ld file for more information on the map of QN9090 FLASH.&lt;/P&gt;
&lt;P&gt;Please, let me know your findings.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Eduardo.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 21:07:52 GMT</pubDate>
    <dc:creator>EduardoZamora</dc:creator>
    <dc:date>2023-09-26T21:07:52Z</dc:date>
    <item>
      <title>Flash Issue in FreeRTOS Application , Unable to Read the Data from  the Flash After a soft reset.</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1728022#M15703</link>
      <description>&lt;DIV&gt;I'm encountering a problem with FLASH memory on the Qn9090 Chip in a FreeRTOS application.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I write data to the flash memory in one task and then use the Read API to retrieve it, the data appears valid. However,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;after a soft reset, the data becomes corrupted, showing only 'db' when I attempt to read it.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hence after a Soft Reset the FLASH Data seems to be corrupted.&lt;/DIV&gt;&lt;DIV&gt;I initially suspected it might be related to task switching, so I disabled all interrupts and suspended all tasks to test this. The issue not fixed.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But&amp;nbsp; when I tried the same experiment in a standalone setup(without Freertos), the data remained valid even after a reset.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Write Operation:&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OSA_InterruptDisable();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;vTaskSuspendAll();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FLASH_Init(FLASH);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int err_code ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; err_code = FLASH_ErasePages(FLASH, FLASH_START_PAGE, 1);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(err_code == kStatus_FLASH_Success)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRINTF(" kStatus_FLASH_Success");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; uint32_t au32Data[sizeof(struct generic_beacon_cota_param_t)];&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (uint32_t i = 0; i &amp;lt; sizeof(struct generic_beacon_cota_param_t); i++)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; au32Data[i] = 0x99;//(uint32_t)(rand());&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; err_code = FLASH_Program(FLASH,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; bcn_cota_params_addr,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;amp;au32Data,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; sizeof(struct generic_beacon_cota_param_t));&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(err_code == kStatus_FLASH_Success)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRINTF(" kStatus_FLASH_Success");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OSA_InterruptEnable();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xTaskResumeAll();&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Read Operation:&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;OSA_InterruptDisable();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; vTaskSuspendAll();&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;uint32_t temp[4];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;uint32_t readData[sizeof(struct generic_beacon_cota_param_t)] = {0};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PRINTF(" Pre Process Data : ");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; for(uint32_t i = 0;i &amp;lt; sizeof(struct generic_beacon_cota_param_t);i += 4)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; FLASH_Read(FLASH, (uint8_t *)(bcn_cota_params_addr + i), 0, (uint32_t *)temp);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; memcpy(&amp;amp;readData[i], (void *)temp, sizeof(temp));&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; PRINTF("%02x ",readData[i]);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; OSA_InterruptEnable();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; xTaskResumeAll();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Output :&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Output: Before Soft Reset&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Pre Process Data :&amp;nbsp; &amp;nbsp; &amp;nbsp; 99 99 99 99 99 99 99 99 00 00 00 00 00&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Output: After Soft Reset&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;Pre Process Data : f601dead dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb dbdbdbdb&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:21:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1728022#M15703</guid>
      <dc:creator>HarishCS</dc:creator>
      <dc:date>2023-09-22T12:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Issue in FreeRTOS Application , Unable to Read the Data from  the Flash After a soft reset</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1728185#M15704</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217611"&gt;@HarishCS&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Hope you are doing well.&lt;/P&gt;
&lt;P&gt;Could you please help us with more details about your application? What is its purpose?&lt;/P&gt;
&lt;P&gt;What QN9090 SDK version are you using? Are you using any of the demo applications from the SDK as base for your development? If so, which one?&lt;/P&gt;
&lt;P&gt;What is the flash region you are trying to write?&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Eduardo.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 17:07:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1728185#M15704</guid>
      <dc:creator>EduardoZamora</dc:creator>
      <dc:date>2023-09-22T17:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Issue in FreeRTOS Application , Unable to Read the Data from  the Flash After a soft reset</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1728318#M15707</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/200888"&gt;@EduardoZamora&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Application uses BLE in it, SDK Version 2.6.5 , build on top of the example wireless UART. I am trying to Write in the Flash Region "0x0009B000"&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2023 05:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1728318#M15707</guid>
      <dc:creator>HarishCS</dc:creator>
      <dc:date>2023-09-23T05:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Issue in FreeRTOS Application , Unable to Read the Data from  the Flash After a soft reset</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1729932#M15723</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;There should be a newer version of the QN9090 SDK, you can download the latest version from the &lt;A href="https://mcuxpresso.nxp.com/en/select" target="_blank"&gt;MCUXpresso SDK Builder&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Have you tested the driver_examples &amp;gt; flash_demo without modifications? Do you observe the same behavior described in this post? Please, compare your read/write procedure with the one from the flash_demo application.&lt;/P&gt;
&lt;P&gt;By any chance, is gAppUseNvm_d set to 1 in app_preinclude.h file?&lt;/P&gt;
&lt;P&gt;Also, could you try the same procedure using another demo application from the SDK without BLE functionality as base?&lt;/P&gt;
&lt;P&gt;As another test, you could try writing to another address outside the NVM region. Please, take a look at the src &amp;gt; connectivity.ld file for more information on the map of QN9090 FLASH.&lt;/P&gt;
&lt;P&gt;Please, let me know your findings.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Eduardo.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 21:07:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Flash-Issue-in-FreeRTOS-Application-Unable-to-Read-the-Data-from/m-p/1729932#M15723</guid>
      <dc:creator>EduardoZamora</dc:creator>
      <dc:date>2023-09-26T21:07:52Z</dc:date>
    </item>
  </channel>
</rss>

