Ejemplo n.º 1
0
void ICACHE_FLASH_ATTR
debug_FlashBufInit()
{
	spi_flash_read(Flash_DEBUG_INFO_ADDR*0x1000,(uint32*)&FlashDebugBufParam,sizeof(FlashDebugBufParam));
	if(debug_FlashParamCsumCheck() && debug_FlashAddrCheck()){
		
	}else{
		debug_FlashBufReset();
	}
}
Ejemplo n.º 2
0
//FLASH buf init
void ICACHE_FLASH_ATTR
debug_FlashBufInit(flashDebugBuf* flashDbgBuf,uint32 idx_sec)
{
    //spi_flash_read(idx_sec*0x1000,(uint32*)flashDbgBuf,sizeof(flashDebugBuf));
	config_ParamLoadWithProtect(idx_sec,0,(uint8*)flashDbgBuf,sizeof(flashDebugBuf));

	if(debug_FlashParamCsumCheck(flashDbgBuf) && debug_FlashAddrCheck(flashDbgBuf)){
        ESP_DBG("flash debug check sum ok..\r\n");
    }else{
        ESP_DBG("flash debug info reset...\r\n");
        debug_FlashBufReset(flashDbgBuf,idx_sec);
    }
}