I'm trying to write some bytes of data at the specific region in the flash using HAL_FLASH_Program (uint32_t TypeProgram, uint32_t Address, uint32_t Data). But my current understanding of from HAL user manual at 19.2.7 UM1749 "Program word at a specified address" is unclear what does it mean? how can i write bytes eg: char* demo="nucleo"
into memory
char* demo="nucleo";
int main(){
.
.
ScratchWrite(FLASH_SCRATCH_START, demo);
.
.
}
uint32_t ScratchWrite(uint32_t destination, uint32_t *p_source)
{
HAL_FLASH_Unlock();
/* Write the buffer to the memory */
HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD,destination, p_source );
HAL_FLASH_Lock();
return status;
}