Working on D-flash in s12x

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Working on D-flash in s12x

1,784 Views
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
Labels (1)
0 Kudos
Reply
2 Replies

503 Views
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 Kudos
Reply

503 Views
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 Kudos
Reply