Hi
I am using Tiva C series launchpad board having TM4C123GH6PM controller.
I want to write data of length 1 byte and 2 byte( not multiple of 4) in internal flash that too at some address e.g. 0x3FFFF, 3FFF9 (not multiple of 4). How i can do that ?
I went through the peripheral driver library which has API "FlashProgram" to write to internal flash. but for this the no of bytes to be written must b multiple of 4 and start address should also be multiple of 4. below is the description taken from peripheral driver library pdf :
9.2.2.8 FlashProgram
Programs flash.
Prototype:
int32_t
FlashProgram(uint32_t *pui32Data,
uint32_t ui32Address,
uint32_t ui32Count)
Parameters:
pui32Data is a pointer to the data to be programmed.
ui32Address is the starting address in flash to be programmed. Must be a multiple of four.
ui32Count is the number of bytes to be programmed. Must be a multiple of four.
Description:
This function programs a sequence of words into the on-chip flash. Each word in a page of
flash can only be programmed one time between an erase of that page; programming a word
multiple times results in an unpredictable value in that word of flash.
Because the flash is programmed one word at a time, the starting address and byte count
must both be multiples of four. It is up to the caller to verify the programmed contents, if such
verification is required.
This function does not return until the data has been programmed.
April 11, 2013 99
Flash
Returns:
Returns 0 on success, or -1 if a programming error is encountered.
Please suggest something how i can accomplish writing bytes single bytes(not multiple of 4) at addresses which are not multiple of 4.
Thanx in advance.