タイミング修正

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1646 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
yutaka 2008-06-18 06:58:48 +00:00
parent 9e50adcc52
commit 478546fcf5

View File

@ -166,15 +166,20 @@ static inline BOOL I2Ci_SendLast( u8 data )
} }
#define SLOW_RATE_DEFAULT 0x50 #define SLOW_RATE_DEFAULT 0x50
#define SLOW_RATE_SHORT 0x0 #define SLOW_RATE_SHORT 0x140
#define SLOW_RATE_LONG (HW_CPU_CLOCK_ARM7 / 13) // 300msec #define SLOW_RATE_LONG (HW_CPU_CLOCK_ARM7 / 13) // 300msec
#define SLOW_RATE_ENTER (HW_CPU_CLOCK_ARM7 / 180) // 22msec #define SLOW_RATE_ENTER (HW_CPU_CLOCK_ARM7 / 160) // 25msec
BOOL MCU_WriteFirm(const unsigned char* hex) BOOL MCU_WriteFirm(const unsigned char* hex)
{ {
BOOL result = TRUE; BOOL result = TRUE;
BOOL temp; BOOL temp;
if ( !hex )
{
return FALSE; // no data
}
I2C_Lock(); I2C_Lock();
slowRate = SLOW_RATE_DEFAULT; slowRate = SLOW_RATE_DEFAULT;
@ -187,7 +192,7 @@ BOOL MCU_WriteFirm(const unsigned char* hex)
slowRate = SLOW_RATE_LONG; slowRate = SLOW_RATE_LONG;
// main phase // main phase
while ( hex[0] == ':' && hex[3] < '3' ) // フォーマットが正しく0x3000以前のアドレスである場合に処理する while ( hex[0] == ':' && ( hex[3] < '2' || (hex[3] == '2' && hex[4] < '4') ) // フォーマットが正しく0x2400以前のアドレスである場合に処理する
{ {
// データ終端チェック (基本的にこの前で終了している) // データ終端チェック (基本的にこの前で終了している)
if ( !MI_CpuComp8( hex, ":00000001FF", 11) ) if ( !MI_CpuComp8( hex, ":00000001FF", 11) )