Other Parts Discussed in Thread: CC2540, CC2530, Z-STACK
Hi all,
We're working on 'firmware update ' task (cc2540) , this is briefly:
when the pc adapter (central device) gets update command from user's application (running on pc) ,the gadget (peripheral device) gets the firmware (bin file) which is transferred using ble rf transceiver, then will be stored in internal flash. I wrote a bootloader code which must be executed from sram because cpu cannot acces the flash while it is being written, so to allow program execution from sram, I mapped the available sram into the lower range of the bank area from 0x8000 through 0x9FFF (8kB ) and I set code memory space banks. Bootloader does the following tasks: erease flash then write new firmware (using dma) and reboot.
and next steps are:
the gadget will copy bootloader to sram using dma->jump to sram->firmware and flash preparation to run ->reset-> load 'new' firmware
What any other steps are necessary to set cpu to begin run that code from sram?
How can I set the cpu begin to read program code from sram?
Thanks.