Has anyone put together an example piece of code that erases and writes the FLASH for any of the SoC devices, cc2510, cc1110 or cc2430?
thanks in advance,
Have a look at the Basic Software Examples for the CC1110 and CC2510 here:http://focus.ti.com/docs/prod/folders/print/cc2510f32.html#toolssoftware
Contains example codes for writing the flash using both DMA and CPU. Should be rather easy to port to the CC2430 as well, just keep in mind the Flash timings.
--PS. Thank you for clicking Verify Answer if this answered your question!
The cpu example without modifying if downloaded to the CC1110 (26MHz Osc).
The FWT = 0x11; which is here observing :
datasheet CC1110 : Page no 88 of 244 : 12.3.5 Flash Write Timing:
FWT = (21000*F)/(16*10⁹) = 21 x 26 / 16 = 0x22. Where F is 26MHz Osc frequency.
"The initial value held in FWT.FWT[5:0] after a reset is 0x11, which corresponds to 13 MHz system clock frequency ( calibrated HSRCOSC frequency for CC1110Fx when using a 26 MHz XOSC )."
Makes me confused for 0x11. Neither 0x22 nor 0x11 work here. However It should not be 0x22. Because the Osc frequency is itself 26MHz so the clock can be the half of the Osc frequency at max. Hence 0x11 seems the number.
FWT = (21000*F)/(16*10⁹) = 21 x 13 / 16 = 0x11.
But not working.
What could be the reason?
What are you trying to do, write data to flash? Writing data to flash with the CPU can not be done while executing code from flash, so the function that writes to flash must be copied to RAM and executed from there. Please see:
Thanks for your answer. As I've mentioned that I did not change the cpu flash code example. Just ran to check its output. I could not find the change in memory section of the IAR IDE. Where to look for change in flash memory in the IDE itself in debug mode?
Or I might be doing something wrong. I want to save some data into a non-volatile memory of CC1110 and retain its values in power cycles. I want to do both read and write. Post which I'll do it with DMA.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.