mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-06-19 09:05:48 -04:00
アップデータを修正
書き換え失敗時、(中断ではなく、データ異常など)復旧を試みる 無限ループや暴走はまずい... git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@120 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
parent
4918ca455d
commit
3db185ef19
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
#define MCU_VER_MAJOR 0x00
|
||||
#define MCU_VER_MINOR 0x10
|
||||
#define MCU_VER_MINOR 0x14
|
||||
|
||||
#define _OVERCLOCK_
|
||||
|
||||
|
@ -13,7 +13,8 @@ __far static const unsigned char MGC_LOAD[] = __TIME__;
|
||||
static const unsigned char MGC_HEAD[] = __TIME__;
|
||||
|
||||
#pragma section @@CNST MGC_TAIL AT 0x4FF6
|
||||
static const unsigned char MGC_TAIL[] = __TIME__;
|
||||
//static const unsigned char MGC_TAIL[] = __TIME__;
|
||||
static const unsigned char MGC_TAIL[] = "fuga_";
|
||||
|
||||
|
||||
// 0Dまでこれを使用
|
||||
|
@ -163,8 +163,8 @@ err firm_update( )
|
||||
{
|
||||
// 書き込み後のチェックエラー
|
||||
// リブートののち、リストア
|
||||
FSL_ForceReset(); // リセット
|
||||
// FSL_SwapBootCluster( );
|
||||
// FSL_ForceReset(); // リセット
|
||||
FSL_SwapBootCluster( );
|
||||
// FSL_Close( );
|
||||
return ( ERR_ERR );
|
||||
}
|
||||
@ -206,8 +206,8 @@ err firm_update( )
|
||||
{
|
||||
// データエラー
|
||||
// リブートののち、リストア
|
||||
FSL_ForceReset(); // リセット
|
||||
// FSL_SwapBootCluster( );
|
||||
// FSL_ForceReset(); // リセット
|
||||
FSL_SwapBootCluster( );
|
||||
// FSL_Close( );
|
||||
// 戻ってこない //
|
||||
}
|
||||
@ -239,8 +239,8 @@ err firm_restore( )
|
||||
|
||||
// リブート
|
||||
// スワップは不要です!
|
||||
// FSL_SwapBootCluster();
|
||||
FSL_ForceReset( );
|
||||
FSL_SwapBootCluster();
|
||||
// FSL_ForceReset( );
|
||||
return ( ERR_SUCCESS );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user