cancel
Showing results for 
Search instead for 
Did you mean: 

SPC564B70L7 DataFlash Problem

orhanyilmaz
Associate II
Posted on February 24, 2016 at 13:12

Hello,

I'm trying my old Flash Library.(for SPC560B50L5) But not working. How is use DFLASH for SPC564B70L7? (debug stop => ''_unhandled_exception:'')

Thanks a lot.

#dflash
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
5 REPLIES 5
Erwan YVIN
ST Employee
Posted on February 24, 2016 at 13:53

Hello Orhan ,

the Flash map is different between BCxx Family (B50L5) and ECxx family (B70L7)

Check the following examples in SPC5Studio.

SPC56ECxx OS-Less Flash Test Application

SPC560BCxx OS-Less Flash Test Application

  Best regards

                Erwan

orhanyilmaz
Associate II
Posted on February 24, 2016 at 14:38

Thanks Erwan. I'm checking now.

orhanyilmaz
Associate II
Posted on February 24, 2016 at 15:31

Hello Erwan,

Do you have open source example flash control driver? Other library very complex and not support easy word write and read.

Thanks.

for Example:

/**

* @brief Initializes the driver.

*/

void

spc5_dflash_init(

void

) {

/* Fixes wrong initialization in HAL driver.*/

// CFLASH.PFCR1.R = 0x318D8081;

CFLASH.PFCR1.B.BK1_APC = 3;

CFLASH.PFCR1.B.BK1_RWSC = 6;

/* Unlock procedure.*/

DFLASH.LML.R = 0xA1A11111;

DFLASH.LML.B.LME = 1;

DFLASH.SLL.R = 0xC3C33333;

DFLASH.SLL.B.SLE = 1;

DFLASH.MCR.R = 0x0;

/* All blocks unlocked.*/

DFLASH.LML.B.LLK = 0;

DFLASH.SLL.B.SLK = 0;

}  bla bla.. Writing :   DFLASH.MCR.R = 0x00000010;

(*(U_32 *)Addr) = data;

DFLASH.MCR.R = 0x00000011;

while(!(DFLASH.MCR.R & 0x00000400));

DFLASH.MCR.R = 0x00000010;

DFLASH.MCR.R = 0x00000000;  

Erwan YVIN
ST Employee
Posted on February 25, 2016 at 09:46

Hello Orhan ,

on FLASH DRIVER SPC5Studio component, We have not the flash driver source code.

Did you try Giovanni's code on DFLASH ?

[DEAD LINK /public/STe2ecommunities/mcu/Lists/SPC56/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/SPC56/Using%20Data%20flash&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000C7B65FFB6DB42540A4DAECE852348058&currentviews=306]https://my.st.com/public/STe2ecommunities/mcu/Lists/SPC56/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSPC56%2FUsing%20Data%20flash&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000C7B65FFB6DB42540A4DAECE852348058&currentviews=306

old post in 2015.

    Best regards

            Erwan

orhanyilmaz
Associate II
Posted on February 25, 2016 at 10:25

Thanks. But not working.