trunk r184-185をマージ

バージョンを0.18に
Horizonリポジトリに0.18としてコミット(r17279)

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@186 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
N2614 2010-05-31 09:50:31 +00:00
parent cf285991e6
commit e57a1135eb
8 changed files with 158 additions and 144 deletions

View File

@ -1,7 +1,7 @@
#ifndef __config__
#define __config__
//#define _debug_led_
#define _debug_led_
//#define _FORCE_OFF_1SEC_
//#define _ALLOW_NOBATT_
//#define _FORCE_INFO_LED_FULLCOLOR_

View File

@ -328,6 +328,7 @@ void clear_hosu_hist()
vreg_ctr[ VREG_C_ACC_HOSU_L ] = 0;
vreg_ctr[ VREG_C_ACC_HOSU_M ] = 0;
vreg_ctr[ VREG_C_ACC_HOSU_H ] = 0;
p_record = 0;
}

View File

@ -933,11 +933,16 @@ void BT_get_left(){
static u8 bt_voltage_low_count; // 電圧でシャットダウンさせる
u8 temp[2];
if( system_status.model == MODEL_TS_BOARD )
{
vreg_ctr[ VREG_C_BT_REMAIN ] = 99;
}
else
{
// 電池電圧で強制断が優先される
temp[0] = iic_mcu_read_a_byte( IIC_SLA_BT_GAUGE, BT_GAUGE_REG_VCELL );
if( iic_mcu_bus_status == ERR_SUCCESS )
{
vreg_ctr[ VREG_C_STATUS_1 ] &= ~REG_BIT_GASGAUGE_ERR;
vreg_ctr[ VREG_C_BT_VOLTAGE ] = temp[0];
if( vreg_ctr[ VREG_C_BT_VOLTAGE ] > ( 3100 / 16 / 1.25 ) )
{
@ -967,8 +972,14 @@ void BT_get_left(){
}
else
{
// バッテリ残量が取れなくなった!
vreg_ctr[ VREG_C_STATUS_1 ] |= REG_BIT_GASGAUGE_ERR;
vreg_ctr[ VREG_C_BT_REMAIN ] = 99;
if( vreg_ctr[ VREG_C_BT_REMAIN ] != 0 )
{
vreg_ctr[ VREG_C_BT_REMAIN ] = 0;
set_irq( VREG_C_IRQ1, REG_BIT_BT_REMAIN );
}
}
}
// 残量で割り込み

View File

@ -55,7 +55,8 @@
#endif
#ifdef _MODEL_CTR_
#define IRQ0_ast { P7.6 = 0; PM7.6 = 0; }
#define IRQ0_neg { PM7.6 = 1; }
//#define IRQ0_neg { PM7.6 = 1; }
#define IRQ0_neg { P7.6 = 1; }
#define IRQ0 ( P7.6 )
#endif

View File

@ -1,28 +1,8 @@
C:\WINDOWS\system32\cmd.exe /c touch magic.c
"C:\Program Files\NEC Electronics Tools\CC78K0R\W2.10\bin\cc78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -irenge -i"C:\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\inc78k0r" -ms -qvjl2wt -sainter_asm -zpb -w2 -no magic.c
magic.c(13) : CC78K0R warning W0871: Data aligned after 'MGC_HEAD'in 'MGC_MIMI section'
magic.c(16) : CC78K0R warning W0871: Data aligned after 'MGC_TAIL'in 'MGC_TAIL section'
magic.c(10) : CC78K0R warning W0871: Data aligned after 'MGC_LOAD'in 'MGC_LOAD section'
Compilation complete, 0 error(s) and 3 warning(s) found.
"C:\Program Files\NEC Electronics Tools\CC78K0R\W2.10\bin\cc78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -irenge -i"C:\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\inc78k0r" -ms -qvjl2wt -sainter_asm -zpb -no magic.c
Compilation complete, 0 error(s) and 0 warning(s) found.
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\ra78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff inter_asm\magic.asm
Assembly complete, 0 error(s) and 0 warning(s) found.
"C:\Program Files\NEC Electronics Tools\CC78K0R\W2.10\bin\cc78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -irenge -i"C:\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\inc78k0r" -ms -qvjl2wt -sainter_asm -zpb -w2 -no adc.c
adc.c(93) : CC78K0R warning W0760: Double and long double are treated as IEEE 754 single format
adc.c(112) : CC78K0R warning W0745: Expected function prototype
adc.c(110) : CC78K0R warning W0309: Unused 'temp'
adc.c(163) : CC78K0R warning W0401: Conversion may lose significant digits
adc.c(171) : CC78K0R warning W0401: Conversion may lose significant digits
adc.c(172) : CC78K0R warning W0401: Conversion may lose significant digits
adc.c(83) : CC78K0R warning W0309: Unused 'old_tune'
adc.c(84) : CC78K0R warning W0309: Unused 'sndvol_codec'
adc.c(85) : CC78K0R warning W0309: Unused 'bt_temp_old'
adc.c(275) : CC78K0R warning W0401: Conversion may lose significant digits
adc.c(310) : CC78K0R warning W0401: Conversion may lose significant digits
adc.c(243) : CC78K0R warning W0714: Too many register variables
adc.c(342) : CC78K0R warning W0851: Data aligned in '@@DATA section'
Compilation complete, 0 error(s) and 13 warning(s) found.
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\ra78k0r.exe" -c9F0104 -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff inter_asm\adc.asm
Assembly complete, 0 error(s) and 0 warning(s) found.
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\lk78k0r.exe" -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -obsr.lmf "..\..\..\Program Files\NEC Electronics Tools\CC78K0R\W2.10\lib78k0r\s0rm.rel" -go85h,0FC00h,1024 -gi0FFFFFFFFFFFFFFFFFFFFh -pbsr_k0r.map -nkd -gb7EFBFFh -b"C:\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\lib78k0r\fsl.lib" -bcl0rdm.lib -bcl0rm.lib -bcl0rmf.lib -i"C:\Program Files\NEC Electronics Tools\CC78K0R\W2.10\lib78k0r" -dbsr_mcu.dr -s -w0 loader.rel pm.rel i2c_ctr.rel main.rel magic.rel WDT.rel i2c_mcu.rel i2c_twl.rel led.rel rtc.rel vreg_ctr.rel vreg_twl.rel adc.rel renge.rel accero.rel self_flash.rel sw.rel task_debug.rel task_misc.rel task_sys.rel pedo_alg_thre_det2.rel ini_VECT.rel task_status.rel
Link complete, 0 error(s) and 0 warning(s) found.
"C:\Program Files\NEC Electronics Tools\RA78K0R\W1.31\bin\oc78k0r.exe" -y"C:\Program Files\NEC Electronics Tools\DEV" -_msgoff -o.\bsr.hex -nu -ki bsr.lmf
@ -33,4 +13,4 @@ intel-HEX to bsr bin converter
file converted!
Build Total error(s) : 0 Total warning(s) : 16
Build Total error(s) : 0 Total warning(s) : 0

View File

@ -80,8 +80,8 @@ Kanji=SJIS
[Source]
Geometry=17, 71, 873, 815
Window=Normal
DispStart=39
CaretPos=80,0
DispStart=67
CaretPos=68,0
Mode=Normal
DispFile=
Address1=
@ -139,14 +139,6 @@ SaveRange=Screen
SaveStart=
SaveEnd=
Accumulative=ON
[Source1]
Geometry=0, 0, 873, 815
Window=Normal
DispStart=554
CaretPos=1,0
Mode=Normal
DispFile=led.c
Accumulative=ON
[Assemble]
Geometry=19, 497, 600, 400
Window=Normal
@ -202,7 +194,7 @@ Endian=Little
Ascii=OFF
Idtag=OFF
Address=
DispStart=00004F70
DispStart=FFFFFFFF
CaretPosData=0, 1271
CaretPosAscii=3, 1271
Address1=
@ -968,54 +960,39 @@ Count=0
Geometry=827, 13, 440, 653
Window=Normal
Boundary=18088086
0=.tdr07,P,S,A,+,1
1=.tdr03,P,S,A,+,1
2=.tdr06,P,S,A,+,1
3=.TOE0,B,S,A,+,1
4=.vreg_twl,P,N,A,+,1
5=.p7.0,P,S,A,+,1
6=.p5.1,P,S,A,+,1
7=.pu7.0,P,S,A,+,1
8=.pm7.0,P,S,A,+,1
9=.pu5.1,P,S,A,+,1
10=.pm5.1,P,S,A,+,1
11=.P20.5,P,S,A,+,1
12=.vreg_ctr,P,N,A,+,1
13=.temperature,D,N,A,+,1
14=.raw_adc_temperature,D,N,A,+,1
15=.info_LED,.,N,A,+,1
16=.list_id,P,N,A,+,1
17=.TDR02,P,S,A,+,1
18=.P4.2,P,S,A,+,1
19=.pool,.,N,A,+,1
20=.p_LED_duty_WiFi,.,N,A,+,1
21=.system_status,.,N,A,+,1
22=.psw,P,R,A,+,1
23=.vreg_ctr,P,N,A,+,1
24=.tasks_immed,P,N,A,+,1
25=.rcomp,D,N,A,+,1
26=.temp_co_dn,D,N,A,+,1
27=.raw_adc_temperature,P,N,A,+,1
28=.temperature,D,N,A,+,1
29=.temp_co_up,D,N,A,+,1
Line=30
0=.system_status,.,N,A,+,1
1=.battery_manufacturer,P,N,A,+,1
2=.bt_comp,.,N,A,+,1
3=.raw_adc_temperature,P,N,A,+,1
4=.PM1.7,P,S,A,+,1
5=.P1.7,P,S,A,+,1
6=.bt_comp,.,N,A,+,1
7=.tasks_immed,P,N,A,+,1
8=.vreg_ctr[2],P,N,A,+,1
9=.vreg_twl[3],P,N,A,+,1
10=.cnt_force_off,P,N,A,+,1
11=.pool.vreg_c_ext,.,N,A,+,1
12=.p_record,P,N,A,+,1
13=.temp_hours,P,N,A,+,1
14=.temp,D,N,A,+,1
Line=15
[Quick Watch]
0=temperature,P,A,1
1=raw_adc_temperature,P,A,1
2=pu70,P,A,1
3=pm7.0,P,A,1
4=pu7.0,P,A,1
5=p7.0,P,A,1
6=p5.1,P,A,1
7=pu5.1,P,A,1
8=pm5.1,P,A,1
9=vreg_twl,P,A,1
10=vreg_ctr,P,A,1
11=P20.5,P,A,1
12=tdr07,P,A,1
13=tdr03,P,A,1
14=tdr06,P,A,1
15=TOE0,P,A,1
0=temp_hours,P,A,1
1=cnt_force_off,P,A,1
2=vreg_ctr[36],P,A,1
3=vreg_ctr[0x24],P,A,1
4=vreg_twl[3],P,A,1
5=vreg_ctr[2],P,A,1
6=tasks_immed,P,A,1
7=temp,P,A,1
8=BT_TEMP_P,P,A,1
9=P1.7,P,A,1
10=PM1.7,P,A,1
11=raw_adc_temperature,P,A,1
12=battery_manufacturer,P,A,1
13=bt_comp,P,A,1
14=systemstatus,P,A,1
15=system_status,P,A,1
[Software Break]
Geometry=805, 623, 500, 296
Window=Normal
@ -1036,19 +1013,63 @@ Name3=Swb00006
Address3=vreg_twl.c#_vreg_twl_write+0x27
Window3=ASM
Status3=ON
Name4=Swb00002
Address4=task_status.c#_tsk_status+0x84
Name4=Swb00010
Address4=loader.c#_main+0x12
Window4=ASM
Status4=ON
Name5=Swb00003
Address5=main.c#_main_loop+0x0
Name5=Swb00002
Address5=i2c_mcu.c#_iic_mcu_is_ready+0x1a
Window5=ASM
Status5=ON
Name6=Swb00004
Address6=led.c#_tsk_led_notify+0x118
Name6=Swb00007
Address6=loader.c#_main+0x2a
Window6=ASM
Status6=ON
Count=7
Name7=Swb00001
Address7=i2c_twl.c#_int_iic_twl+0x43
Window7=ASM
Status7=ON
Name8=Swb00006
Address8=pm.c#_BT_get_left+0x81
Window8=ASM
Status8=ON
Name9=Swb00011
Address9=pm.c#_BT_init+0xa1
Window9=ASM
Status9=ON
Name10=Swb00003
Address10=task_sys.c#_tsk_sys+0x25a
Window10=ASM
Status10=ON
Name11=Swb00012
Address11=task_sys.c#_tsk_sys+0x88
Window11=ASM
Status11=ON
Name12=Swb00013
Address12=task_sys.c#_tsk_sys+0x99
Window12=ASM
Status12=ON
Name13=Swb00014
Address13=task_sys.c#_tsk_sys+0xa8
Window13=ASM
Status13=ON
Name14=Swb00016
Address14=task_sys.c#_tsk_sys+0x79
Window14=ASM
Status14=ON
Name15=Swb00017
Address15=task_sys.c#_tsk_sys+0xbe
Window15=ASM
Status15=ON
Name16=Swb00018
Address16=task_sys.c#_tsk_sys+0x8b
Window16=ASM
Status16=ON
Name17=Swb00009
Address17=pm.c#_BT_get_left+0x0
Window17=ASM
Status17=ON
Count=18
[Reset]
Debugger=ON
Symbol=OFF

View File

@ -4,24 +4,24 @@ FrameX=0
FrameY=54
FrameCX=1299
FrameCY=1044
OpenFile1=renge\renge.h,0,502,637,1746,1394,29,16,29,0
OpenFile2=jhl_defs.h,0,250,539,1494,1265,0,10,8,0
OpenFile3=renge\\renge_defs.h,0,293,307,1537,1033,18,37,18,0
OpenFile4=pm.h,0,254,446,1244,1062,0,115,0,0
OpenFile5=vreg_ctr.h,0,632,184,1876,910,8,40,25,0
OpenFile6=ProjectWindow
OpenFile1=vreg_ctr.h,0,132,132,1376,889,15,156,15,0
OpenFile2=magic.c,0,154,154,1398,911,20,16,28,0
OpenFile3=led.c,0,289,306,1533,1063,57,620,57,0
OpenFile4=loader.c,0,169,287,1413,1044,0,37,25,0
OpenFile5=pedo_alg_thre_det2.c,0,242,242,1486,999,25,108,25,0
OpenFile6=sw.c,0,264,264,1508,1021,30,125,0,0
OpenFile7=ProjectWindow
PrjPos=0,2,754,3,253
OpenFile7=magic.c,0,323,248,1567,974,0,17,0,0
OpenFile8=vreg_twl.c,0,286,286,1530,1012,2,65,2,0
OpenFile9=adc.c,0,286,286,1530,1012,0,173,0,0
OpenFile10=sw.c,0,574,367,1818,1093,0,57,43,0
OpenFile11=loader.c,0,296,307,1286,923,0,126,20,0
OpenFile12=config.h,0,316,50,1560,776,29,10,29,0
OpenFile13=led.c,0,315,193,1559,919,0,541,0,0
OpenFile14=task_sys.c,0,330,330,1574,1056,13,236,12,0
OpenFile15=OutputWindow
OutputPos=0,573,1039,440,1498
OpenFile16=batt_params.h,0,0,0,1244,757,0,92,0,0
OpenFile8=i2c_twl.c,0,308,308,1552,1065,13,130,0,0
OpenFile9=renge\renge.c,0,352,352,1596,1109,6,191,16,0
OpenFile10=config.h,0,286,37,1530,794,40,30,40,0
OpenFile11=..\branches\0.15(sdk0.9_E3_fix_vol_core1.20V)\pm.h,0,193,138,1437,895,5,156,107,0
OpenFile12=task_sys.c,0,198,198,1442,955,0,83,0,0
OpenFile13=OutputWindow
OutputPos=0,44,989,1000,1587
OpenFile14=pm.h,0,44,44,1288,801,43,74,43,0
OpenFile15=user_define.h,0,22,22,1266,779,0,1,0,0
OpenFile16=config.h,0,44,44,1288,801,0,1,0,0
ActivePRJ=yav_mcu_bsr.prj
[ProjectWindow]
ProjectWindowDispType=0

View File

@ -11,7 +11,7 @@ T=4bf64019
7=rtc.h
8=reboot.h
[pm.c]
T=4bfb814e
T=4c0336e4
1=incs.h
2=adc.h
3=led.h
@ -35,7 +35,7 @@ T=4bf636cb
7=adc.h
8=pool.h
[magic.c]
T=4bfb98f5
T=4c0343a1
1=config.h
[WDT.c]
T=4bf0d1e1
@ -76,7 +76,7 @@ T=4bfb7246
4=vreg_twl.h
5=vreg_ctr.h
[adc.c]
T=4bfa2806
T=4bff5669
1=incs.h
2=adc.h
3=pm.h
@ -171,7 +171,7 @@ T=4bf0d1e1
T=4bf0d1e0
1=config.h
[config.h]
T=4bfb80cc
T=4c031fb9
[user_define.h]
T=4bf6321a
[bsr_system.h]
@ -203,7 +203,7 @@ T=4bf0d1e0
[i2c_ctr.h]
T=4bf0d1e1
[pm.h]
T=4bf65407
T=4c031ee9
[rtc.h]
T=4bf0d1e1
[reboot.h]