Working on D-flash in s12x

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Working on D-flash in s12x

2,211 次查看
rajad
Contributor I
I want to read and write NVM data to d-flash  in s12x  board.I have doubt on global addressing.

Sample code:
The global addresses are required. i.e. 0x10_0C00 must be used in this case
    FCCOBIX =  0x00;
    FCCOBHI =  0x12;    /* Erase D-Flash sector command */
->  FCCOBLO =  0x10;    /* Global address = 10 */

 Memory mapping registers gpage is need to set any value or above code is enough.any one  having sample project dealing with d-flash.Can u pls share it? this is urgent pls

Thanks in advance
标签 (1)
0 项奖励
回复
2 回复数

930 次查看
nandu
Contributor III
Hi Rajad,
 
I feel you don't need to set/configure any value specially to G-page.
 
Yes, you are right. we must use Global address scheme in the D-flash command registers..
 
The sample code that was given by you is OK (Thinking that you must have already configured your flack clock register (FCLKDIV) before doing any kind of flash operations)
 
But to erase a D-Flash sector successfully, you should mention the logical sector addres also..(may be you know this ..) like..
 
FCCOBIX   = 0x00;       /* index 0 */
FCCOBHI   = 0x12;       /* D-Flash Erase command */
FCCOBLO = 0x10;       /* Global address value i.e. G-Page value */
FCCOBIX   = 0x01;       /* index 1 */
FCCOB      = 0x0100;   /* sector address of a D-Flash */ 
 
please check the attached file, it may help you..
0 项奖励
回复

930 次查看
rajad
Contributor I

Hi nandu,

Thnks for help regarding previous quiry response.working on d-flash in s12xf
I have few queries


1.On MCU protection :if it is in protection mode,we can't execute some commands.If it in single chip mode,then it allows some commands.For working d-flash,is need to consider abt this protection.Pls help regarding this.

2.which memory system(small,banked,large) we need to select for working on global memory address


regards,

Raja

0 项奖励
回复