Part Number: TMS570LS0914
Hello,
I am trying to write some data to flash. but the code gets crash at Fapi_setActiveFlashBank(bank0).
this happens specifiaclly bank0. before calling this function I have copied code from falsh to ram.
for writing to flash can I use flash bank1 or I have to start write from flash bank0 only?
the squence of write is :
- Check whether the address range falls within the Flash Memory
- Iterate through the banks in the Flash
- Check whether the address falls within the bank
- Set the bank to an active state
- Retrieve the list of sectors to be enabled
- Enable the sectors to be written
- Wait for the operation to complete
- Iterate through the addresses in the Flash Bank
- Set the number of bytes to be written in the next operation
- Write to the Flash address
- Wait for the operation to complete
- Check whether the operation is successful
- Update the buffer pointer, flash address and the number of bytes left for the next operation
- Control goes to step 8 and keep iterating till valid address
- After completing the iteration, If an error is encountered or the write operation is complete, exit the loop of step 2.
my writting address is 0x000E0000 and data to write is 0xAA.
kindly help me to resolve this issue.