アップデータを修正

書き換え失敗時、(中断ではなく、データ異常など)復旧を試みる
 無限ループや暴走はまずい...

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:
fujita_ryohei 2010-04-02 08:02:51 +00:00
parent 4918ca455d
commit 3db185ef19
3 changed files with 9 additions and 8 deletions

View File

@ -6,7 +6,7 @@
#define MCU_VER_MAJOR 0x00
#define MCU_VER_MINOR 0x10
#define MCU_VER_MINOR 0x14
#define _OVERCLOCK_

View File

@ -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までこれを使用

View File

@ -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 );
}