Hi
I have already posted a question regarding flash api.
Unfortunately I am not able to get the appreciable answer.
I need few help regarding the api.
I have attached the reference code provided
UINT32 k; /* enable CLEAN macro (if applicable) */ ENA_CLEAN; /* retrieve MAC2 value and enable the appropriate core */ k=cntl[MAC2];CLEAN(k);cntl[MAC2]=(k&~0x7)|core; /* disable level 1 sector protection */ k=cntl[MAC1];CLEAN(k);cntl[MAC1]=(k|0x8000); /* 0x2fc0 = TCR=0 */ cntl[TCR]=0x2fc0; /* start VNV steps at 0, Max programming pulses */ cntl[MAXPP]=0x0000+MAX_PROG_PLS; /* 16 pulses per VNV step, Max compaction pulses */ cntl[MAXCP]=0xf000+MAX_CMPCT_PLS; /* retrieve MAXEP */ k=cntl[MAXEP];CLEAN(k); /* disable CLEAN macro (if applicable) */ DIS_CLEAN; /* Check for Baseline 4 material */ if ((k&0xf000)==0xf000) { /* VHV = 9.0v during erase */ cntl[PTR3]=0x9964; /* Max VNV step = 0xf */ cntl[MAXEP]=(0xf000+MAX_ERASE_PLS); } else { /* Baseline > 4 */ /* VHV = 9.0v during erase */ cntl[PTR3]=0x9b64; /* Max VNV step = 0xa */ cntl[MAXEP]=(0xa000+MAX_ERASE_PLS); } /* Set Vread to 5.0v */ cntl[PTR4]=0xa000; /* Program setup = 500nS, Erase setup = 8uS */ cntl[PESETUP]=((delay<<8)|(delay<<4)); /* ProgVer access = 1us, ErsVer access = 1us */ k=(delay<<8|delay)<<1; cntl[PVEVACCESS]=k; /* Program hold = 1us, Compaction hold = 1us */ cntl[PCHOLD]=k; /* PrgVer hold = 1us, ErsVer hold = 1us */ cntl[PVEVHOLD]=k; /* PrgVer setup = 1us, ErsVer setup = 1us */ cntl[PVEVSETUP]=k; /* CmpctVer access = 8us */ cntl[CVACCESS]=(delay<<4); /* Compaction setup = 10us */ k=(delay*20); cntl[CSETUP]=(0x3000|k); /* Erase hold = 40us */ cntl[EHOLD]=(k<<2); /* Program pulse width */ cntl[PWIDTH]=(delay*PROG_PLS_WIDTH); /* Compaction pulse width */ cntl[CWIDTH]=(delay*CMPCT_PLS_WIDTH); /* Erase pulse width */ cntl[EWIDTH]=(delay*ERASE_PLS_WIDTH);
Kindly let me know does the flash really needs 9 volts pump charger for erasing the flash!
On what basics that is calculated. I am not able to find calculation and what could be done
My board is getting reset exactly after the commands are executed
init_state_machine_D(core,delay,cntl); /* clear status register */ *(volatile UINT16 *)start=0x40; /* Validate Sector command */ *(volatile UINT16 *)start=0x1000; /* Dummy data value */ *(volatile UINT16 *)start=0xffff; /* track compaction pulses */
Not sure what is causing the issue
Kindly request you to help out with appreciable answer!
Thank you
Deepak R