Hello,
We are using HALCOGEN tool to generate code for initialization which got setupFlash() function. Now we wanted to program and erase using registers and were referring below documents for developing our own code:
SPNU499C
SPNA148
spnu501h
Below is the algorithm used to program flash:
1. Configure FMAC register with Bank.
2. Configure FBSE register to select bank sector.
3. Enable flash write using FSMWRENA register.
4. configure FSM_CMD for clearing status.
5. Write 0x15 value to FSM_EXECUTE register to execute flash command.
6. program FADDR register with sector address.
7. Program FWPWRITE registers with data to be written.
8. configure FSM_CMD for programming.
9. Write 0x15 value to FSM_EXECUTE register to execute flash command.
when above program is executed we are getting below error bits set in FMSTAT register:
INVDAT
CSTAT
SLOCK
What could be the reason for this behavior and is there any document where the actual algorithm is captured for Flash Initialization, Program and erase?
Thanks in advance.
Thanks,
Kalyan