<?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 MC56f83783 programming and reading from flash not working in Digital Signal Controllers</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1634166#M2705</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to program and read from the Flash with no success. I'm using the fsl drivers:&lt;/P&gt;&lt;P&gt;fsl_flashiap.h&lt;/P&gt;&lt;P&gt;fsl_flashiap.c&lt;/P&gt;&lt;P&gt;from the&amp;nbsp;project_template_mc56f83xxx&lt;/P&gt;&lt;P&gt;this is what I'm doing:&lt;/P&gt;&lt;P&gt;#define DATA_FLASH_START 0x20000&lt;BR /&gt;#define FLASH_SECTOR_SIZE 0x800&lt;/P&gt;&lt;P&gt;status_t fstatus;&lt;/P&gt;&lt;P&gt;uint8_t test_program_buffer[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };&lt;/P&gt;&lt;P&gt;uint8_t readresource_ifr[64];&lt;/P&gt;&lt;P&gt;flash_config_t sFlashConfig[] = {&lt;BR /&gt;{ 0 }&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;FLASH_Init(sFlashConfig);&lt;/P&gt;&lt;P&gt;fstatus = FLASH_Erase(sFlashConfig, DATA_FLASH_START, FLASH_SECTOR_SIZE, kFLASH_ApiEraseKey);&lt;BR /&gt;fstatus = FLASH_ProgramSection(sFlashConfig, (uint32_t)DATA_FLASH_START, (uint8_t *)test_program_buffer, (uint32_t)8);&lt;BR /&gt;fstatus = FLASH_ReadResource(sFlashConfig, (uint32_t)DATA_FLASH_START, (uint8_t *)readresource_ifr, (uint32_t)8, kFLASH_ResourceOptionFlashIfr);&lt;/P&gt;&lt;P&gt;I'm getting 0xFF on all the bytes in&amp;nbsp;readresource_ifr[] which I expected to read back the programmed data bytes&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imagine that the problem is that the bytes are not programmed into the Flash, but why&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Apr 2023 07:50:26 GMT</pubDate>
    <dc:creator>zivn</dc:creator>
    <dc:date>2023-04-15T07:50:26Z</dc:date>
    <item>
      <title>MC56f83783 programming and reading from flash not working</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1634166#M2705</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to program and read from the Flash with no success. I'm using the fsl drivers:&lt;/P&gt;&lt;P&gt;fsl_flashiap.h&lt;/P&gt;&lt;P&gt;fsl_flashiap.c&lt;/P&gt;&lt;P&gt;from the&amp;nbsp;project_template_mc56f83xxx&lt;/P&gt;&lt;P&gt;this is what I'm doing:&lt;/P&gt;&lt;P&gt;#define DATA_FLASH_START 0x20000&lt;BR /&gt;#define FLASH_SECTOR_SIZE 0x800&lt;/P&gt;&lt;P&gt;status_t fstatus;&lt;/P&gt;&lt;P&gt;uint8_t test_program_buffer[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };&lt;/P&gt;&lt;P&gt;uint8_t readresource_ifr[64];&lt;/P&gt;&lt;P&gt;flash_config_t sFlashConfig[] = {&lt;BR /&gt;{ 0 }&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;FLASH_Init(sFlashConfig);&lt;/P&gt;&lt;P&gt;fstatus = FLASH_Erase(sFlashConfig, DATA_FLASH_START, FLASH_SECTOR_SIZE, kFLASH_ApiEraseKey);&lt;BR /&gt;fstatus = FLASH_ProgramSection(sFlashConfig, (uint32_t)DATA_FLASH_START, (uint8_t *)test_program_buffer, (uint32_t)8);&lt;BR /&gt;fstatus = FLASH_ReadResource(sFlashConfig, (uint32_t)DATA_FLASH_START, (uint8_t *)readresource_ifr, (uint32_t)8, kFLASH_ResourceOptionFlashIfr);&lt;/P&gt;&lt;P&gt;I'm getting 0xFF on all the bytes in&amp;nbsp;readresource_ifr[] which I expected to read back the programmed data bytes&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imagine that the problem is that the bytes are not programmed into the Flash, but why&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 07:50:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1634166#M2705</guid>
      <dc:creator>zivn</dc:creator>
      <dc:date>2023-04-15T07:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: MC56f83783 programming and reading from flash not working</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1634520#M2707</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;First of all,can you tell us the part number you are using? some Part number has only 128KB, some has 256KB.&lt;/P&gt;
&lt;P&gt;Secondly, in the debugger, you can check if the flash contents are updated or not, you can display the memory from address P:0x1000, because you use byte address when you execute erasing/programming operation.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 09:16:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1634520#M2707</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-04-17T09:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: MC56f83783 programming and reading from flash not working</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1634597#M2708</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the MC56F83783VLH&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this processor has 256K&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to look with the debugger both at address 0x10000 in word and and 0x20000 in byte and It's not showing that the flash is neither erased not programmed.&lt;/P&gt;&lt;P&gt;What address should I send to the erase operation and which address to the program if I want to access 0x20000 which is the first address of the second block ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 10:23:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1634597#M2708</guid>
      <dc:creator>zivn</dc:creator>
      <dc:date>2023-04-17T10:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: MC56f83783 programming and reading from flash not working</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1635001#M2710</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls try to use flashiap example in SDK package and check if there is any issue.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 02:45:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1635001#M2710</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-04-18T02:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: MC56f83783 programming and reading from flash not working</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1639144#M2713</link>
      <description>&lt;P&gt;I managed to successfully write to the flash. I can program bytes in to address 0x20000, and then I can see the data in flash in address 0x10000 but only if I look at the address as program and not as data&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zivn_0-1682362382734.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220611iA4C5DAF57CE44637/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zivn_0-1682362382734.png" alt="zivn_0-1682362382734.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is, how do I access this data from the code ?&lt;/P&gt;&lt;P&gt;I tried a few things but keep getting the wrong data:&lt;/P&gt;&lt;P&gt;uint8_t *fdata[8];&lt;/P&gt;&lt;P&gt;*fdata = (uint8_t *)(0x20000);&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;uint32_t *fdata;&lt;/P&gt;&lt;P&gt;fdata = (uint32_t *)(0x20000);&lt;/P&gt;&lt;P&gt;I get the wrong data in fdata, although the address is 0x20000&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zivn_1-1682363394628.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220614i73380D707035F6D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zivn_1-1682363394628.png" alt="zivn_1-1682363394628.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How do I read the data from the flash correctly ?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 19:11:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1639144#M2713</guid>
      <dc:creator>zivn</dc:creator>
      <dc:date>2023-04-24T19:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: MC56f83783 programming and reading from flash not working</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1639407#M2715</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If you want to read program flash, I suppose that there are two methods:&lt;/P&gt;
&lt;P&gt;1)using the api function defined in the AN1952.pdf&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com.cn/docs/en/application-note/AN1952.pdf" target="_blank"&gt;https://www.nxp.com.cn/docs/en/application-note/AN1952.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But the AN is based on DSP56800 core, now the MC56F83xxx uses DSP56800EX core, you have to modify the api function.&lt;/P&gt;
&lt;P&gt;2)The program address in program domain is also mapped to data address in data domain, pls checked the data sheet and get the address in data domain.For example,&lt;/P&gt;
&lt;P&gt;P:0x0_0000~0x1_FFFF is mapped to the data memory X:2_0000~3_FFFF, so you can read the X:3_0000 to get the data in P:0x1_0000.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 05:12:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1639407#M2715</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-04-25T05:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: MC56f83783 programming and reading from flash not working</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1640180#M2716</link>
      <description>&lt;P&gt;Thanks, this solved the problem&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 05:23:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/MC56f83783-programming-and-reading-from-flash-not-working/m-p/1640180#M2716</guid>
      <dc:creator>zivn</dc:creator>
      <dc:date>2023-04-26T05:23:31Z</dc:date>
    </item>
  </channel>
</rss>

