Part Number: TM4C1292NCPDT
Tool/software: TI-RTOS
Hi,
I am using tirtos_tivac_2_16_01_14 and TivaWare_C_Series-2.1.4.178 for project. I am using one of the flash segment for storing non-volatile data for my application and this data will be written from one of the task in my application. There are other higher priority tasks and ISRs running in my application.
i want to prevent the below block of code should not be preempted by any other task or ISR before completing it.
void flashWrite(BOOT_STRUCT *stFlashData)
{
int ret;
ret = FlashErase((uint32_t ) FLASH_COMMON_MEMORY_ADDRESS);
if(ret != NULL)
{
System_printf("FLash memory is not erased successfully\n");
}
ret = FlashProgram((uint32_t *)stFlashData,
FLASH_COMMON_MEMORY_ADDRESS, 2048);
if(ret != NULL)
{
System_printf("FLash memory is not programmed successfully\n");
}
System_flush();
}
anybody have suggestion, how to do it?
some time, after flash erase is completed, the task is preempted by other task/ISR before completing flash program and these flash data is needed for other tasks to run.
Regards
Bala