|
@@ -23,7 +23,8 @@ void Fota_Func(UINT8 *DataPtr,INT32 connectId)
|
|
|
UINT8 Fota_Answer[43];
|
|
|
UINT8 Fota_Cmd;
|
|
|
INT8 ret;
|
|
|
- Fota_S.Fota_Flash_Addres = FLASH_FOTA_REGION_START;
|
|
|
+ //Fota_S.Fota_Flash_Addres = FLASH_FOTA_REGION_START;
|
|
|
+ Fota_S.Fota_Flash_Addres = FLASH_BMS_FOTA_START_ADDR;
|
|
|
if(*(DataPtr+30)==0x01)
|
|
|
{
|
|
|
Fota_Cmd = *(DataPtr+31);
|
|
@@ -44,7 +45,7 @@ void Fota_Func(UINT8 *DataPtr,INT32 connectId)
|
|
|
memcpy(&Fota_Answer[24],(DataPtr+24),18);
|
|
|
Fota_Answer[42] = bcc_chk_fota(Fota_Answer,42);
|
|
|
tcpipConnectionSend(connectId,Fota_Answer,43,0,0,0);
|
|
|
- BSP_QSPI_Erase_Safe(FLASH_FOTA_REGION_START,Fota_S.Fota_All_Data_Len + 4 - (Fota_S.Fota_All_Data_Len%4)); //512k-32k = 480k -> 0x75300 0x78000
|
|
|
+ BSP_QSPI_Erase_Safe(Fota_S.Fota_Flash_Addres,Fota_S.Fota_All_Data_Len + 4 - (Fota_S.Fota_All_Data_Len%4)); //512k-32k = 480k -> 0x75300 0x78000
|
|
|
break;
|
|
|
}
|
|
|
case 0x02:
|