void ICACHE_FLASH_ATTR sp_PairedParamSave(PairedButtonParam* buttonParam)
{
	buttonParam->magic = SP_PARAM_MAGIC;
	config_ParamCsumSet(buttonParam,&(buttonParam->csum),sizeof(PairedButtonParam));
	config_ParamSaveWithProtect(LIGHT_PAIRED_DEV_PARAM_ADDR,(uint8*)buttonParam ,sizeof(PairedButtonParam));
	os_printf("debug: check again: \r\n");
	
	config_ParamCsumCheck(buttonParam,sizeof(PairedButtonParam));
}
//save flash debug param
void ICACHE_FLASH_ATTR
    debug_FlashParamSv(flashDebugBuf* flashDbgBuf,uint32 sec_addr)
{
	ESP_DBG("debug_FlashParamSv\r\n");

    debug_FlashParamCsumSet(flashDbgBuf);
	
    //spi_flash_erase_sector(Flash_DEBUG_INFO_ADDR);
    //spi_flash_write(Flash_DEBUG_INFO_ADDR*0x1000,(uint32*)&FlashDebugBufParam,sizeof(FlashDebugBufParam));  
	config_ParamSaveWithProtect(sec_addr,(uint32*)flashDbgBuf,sizeof(flashDebugBuf));
}