2015-02-18 03:25 AM
Hello Members,
I am using SPC560D030 for my product. I want to use the Data flash to store the device configuration i.e. I want to use Data flash as NVM. The configuration data is of 120 bytes. I tried reading the reference manual (CD00259063.pdf) on using the Data flash as NVM but may be I am unable to understand on reading/writing to Data flash. I don't find any APIs for it. How can I use the 'DFLASH' for reading or writing? Any example code or document reference will be helpful.Thanks in advance for any help.Mike. #dflash #dataflash #dataflash #orhan-y?lmaz #data-flash2015-02-23 01:07 AM
Hi,
Attached there is some -unofficial- code I wrote. Giovanni ________________ Attachments : source.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0S2&d=%2Fa%2F0X0000000bZ7%2FWNu1EFPKCggfY50dV8Iy8ETURWSJnyeuhc6dAGTCuwU&asPdf=false2015-02-24 03:01 AM
Thanks Giovanni. I shall update you when I make use of this code.
Thanks.Mike.2015-03-10 05:45 AM
HelloGiovanni,
I tried using the code for reading/writing to data flash. I used discovery kit SPC560D-DIS and used the code provided. I have not succeeded writing any data and hence unable to read anything. It gives an error as 'CallFrame, unable to read register R1' and the execution stops. Even I tried to write few bytes using the UDE Visual platform but there also it failed to write. Please see attached log for the same. Please clarify the issue. Thanks. Mike. ________________ Attachments : DFlash_10Mar15.log : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0My&d=%2Fa%2F0X0000000bZ8%2FinIR4DuKq6lRjJX7xDZZM0jmPJNSNpmyPlrCWBkFgxE&asPdf=false2015-03-16 08:00 AM
Hello Giovanni,
I tried using the code for reading/writing to data flash. I used discovery kit SPC560D-DIS and used the code provided. I have not succeeded writing any data and hence unable to read anything. It gives an error as 'CallFrame, unable to read register R1' and the execution stops.Even I tried to write few bytes using the UDE Visual platform but there also it failed to write. Please see attached log from the previous post for it.Please clarify the issue. Thanks.Mike.2015-03-24 07:56 AM
Has anyone worked with Data Flash for SPC560D? I am unable to write to it using UDE interface. Can anyone explain on using Data Flash?
Thanks in advance.Mike.2015-03-28 06:15 AM
Hi Mike
I use the Giovanni code and it is ok on SPC560B50L5 and i see the writed data on UDE Memory View .2015-04-27 02:21 AM
2015-04-29 04:34 AM
Hello Orhan & Mike,
There is no issue on Giovanni's source code. it is working well ;) 0x800000 is mapped on DFLASH.spc5_dflash_init();
spc5_dflash_write_word(0x0,0x55555555);
spc5_dflash_write_word(0x4,0x55555555);
Check on UDE ((*(uint32_t *)0x800000)) you will see the value.
Anyway, SPC560Bxx OS-Less Flash Integration Test Application test is available in SPC5Studio Appwizard.
Best regards
Erwan
2015-04-29 06:38 AM
Hello Erwan,
Your test addr(0x0 and 0x4) is not mapped DFLASH. It is mapped Code FLASH. (CFLASH)I checked but not change.Thanks.