mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-10-31 13:51:10 -04:00
・残量の少ない電池を入れたとき、お知らせLED赤が一瞬点く問題、対応が完全でなかった。
根本対策...を行った ・互換でのカメラLEDがTWLと異なる動作をする。NUP1に入れたい(村上さん)とのことなので対応。チェックはこれから。パワプロクン12のみ確認。 git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@322 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
parent
1ae045df55
commit
c71b6c1b0a
BIN
trunk/hoge.bin
BIN
trunk/hoge.bin
Binary file not shown.
18
trunk/led.c
18
trunk/led.c
@ -53,6 +53,9 @@ static u8 led_pow_batt_low();
|
|||||||
// 赤LEDの電池残量LEDの点滅パターン
|
// 赤LEDの電池残量LEDの点滅パターン
|
||||||
st_led_red_batt_empty led_red_batt_empty = { 0x55, 0x55, 0x55, 0x55 };
|
st_led_red_batt_empty led_red_batt_empty = { 0x55, 0x55, 0x55, 0x55 };
|
||||||
|
|
||||||
|
bit initialized;
|
||||||
|
|
||||||
|
|
||||||
// お知らせLEDのパターンデータ
|
// お知らせLEDのパターンデータ
|
||||||
uni_info_LED info_LED;
|
uni_info_LED info_LED;
|
||||||
|
|
||||||
@ -200,6 +203,7 @@ void LED_init( )
|
|||||||
LED_duty_pow_blu = LED_BRIGHT_MAX;
|
LED_duty_pow_blu = LED_BRIGHT_MAX;
|
||||||
}
|
}
|
||||||
info_led_off = false;
|
info_led_off = false;
|
||||||
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -212,6 +216,7 @@ void LED_stop( )
|
|||||||
LED_pow_red = 0;
|
LED_pow_red = 0;
|
||||||
LED_CAM = 0;
|
LED_CAM = 0;
|
||||||
LED_old_pow_red = 0;
|
LED_old_pow_red = 0;
|
||||||
|
initialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -241,6 +246,12 @@ enum LED_ILUM_MODE{
|
|||||||
======================================================== */
|
======================================================== */
|
||||||
void tsk_led_pow( )
|
void tsk_led_pow( )
|
||||||
{
|
{
|
||||||
|
if( ! initialized )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
// おしまい
|
||||||
|
}
|
||||||
|
|
||||||
info_led_override = false;
|
info_led_override = false;
|
||||||
|
|
||||||
switch ( vreg_ctr[VREG_C_LED_POW] )
|
switch ( vreg_ctr[VREG_C_LED_POW] )
|
||||||
@ -654,7 +665,7 @@ void tsk_led_notify( )
|
|||||||
void tsk_led_cam( )
|
void tsk_led_cam( )
|
||||||
{
|
{
|
||||||
static u8 state_led_cam = 0;
|
static u8 state_led_cam = 0;
|
||||||
static u8 task_interval;
|
static u16 task_interval;
|
||||||
u8 LED_CAM_mirror;
|
u8 LED_CAM_mirror;
|
||||||
|
|
||||||
DI(); // レジスタへの書き込みで強制起動がかかることがあるため
|
DI(); // レジスタへの書き込みで強制起動がかかることがあるため
|
||||||
@ -732,7 +743,8 @@ void tsk_led_cam( )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case( CAM_LED_BY_TWL ):
|
case( CAM_LED_BY_TWL ):
|
||||||
switch ( vreg_twl[ REG_TWL_INT_ADRS_CAM ] ){ // switchのネストとか…
|
// TWL互換 //
|
||||||
|
switch ( vreg_twl[ REG_TWL_INT_ADRS_CAM ] ){ //. switchのネストとか…
|
||||||
case( TWL_CAMLED_OFF ):
|
case( TWL_CAMLED_OFF ):
|
||||||
LED_CAM_mirror = 0;
|
LED_CAM_mirror = 0;
|
||||||
state_led_cam = 0;
|
state_led_cam = 0;
|
||||||
@ -749,7 +761,7 @@ void tsk_led_cam( )
|
|||||||
LED_CAM_mirror = 0;
|
LED_CAM_mirror = 0;
|
||||||
state_led_cam = 0;
|
state_led_cam = 0;
|
||||||
}
|
}
|
||||||
task_interval = 250;
|
task_interval = 600 / SYS_INTERVAL_TICK + 250;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case( TWL_CAMLED_ON ):
|
case( TWL_CAMLED_ON ):
|
||||||
|
|||||||
@ -61,7 +61,7 @@ void vreg_twl_write( u8 adrs, u8 data )
|
|||||||
{
|
{
|
||||||
cam_led_update = true; // こうでないと一発消灯時に不具合があるため
|
cam_led_update = true; // こうでないと一発消灯時に不具合があるため
|
||||||
}
|
}
|
||||||
tsk_led_cam();
|
tsk_led_cam();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ( REG_TWL_INT_ADRS_TEMP0 ):
|
case ( REG_TWL_INT_ADRS_TEMP0 ):
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Firm Clock=System
|
|||||||
Flash Programming=Permit
|
Flash Programming=Permit
|
||||||
Low-voltage Flash Rewriting=On
|
Low-voltage Flash Rewriting=On
|
||||||
Fail Safe Break=0x2000
|
Fail Safe Break=0x2000
|
||||||
Port=1
|
Port=0
|
||||||
NMI=OFF
|
NMI=OFF
|
||||||
TRESET=OFF
|
TRESET=OFF
|
||||||
IRESET=OFF
|
IRESET=OFF
|
||||||
@ -22,7 +22,7 @@ SubClock=None
|
|||||||
[Mapping]
|
[Mapping]
|
||||||
Count=0
|
Count=0
|
||||||
[Main]
|
[Main]
|
||||||
Geometry=110, 110, 1200, 858
|
Geometry=66, 66, 960, 728
|
||||||
Window=Max
|
Window=Max
|
||||||
MDI_MAX=OFF
|
MDI_MAX=OFF
|
||||||
Button=ON
|
Button=ON
|
||||||
@ -58,7 +58,7 @@ Symbol Reset1=ON
|
|||||||
Dir=\\tsclient\C\78k_data\yav-mcu-basara\trunk\
|
Dir=\\tsclient\C\78k_data\yav-mcu-basara\trunk\
|
||||||
Filter=Source
|
Filter=Source
|
||||||
[Debugger Option]
|
[Debugger Option]
|
||||||
Source Path=""
|
Source Path="\\tsclient\C\78k_data\yav-mcu-basara\trunk\renge"
|
||||||
Symbol Size=Byte
|
Symbol Size=Byte
|
||||||
Symbol Format=Hex
|
Symbol Format=Hex
|
||||||
Register Name=Func
|
Register Name=Func
|
||||||
@ -78,10 +78,10 @@ Symbol Type=OFF
|
|||||||
Language=C
|
Language=C
|
||||||
Kanji=SJIS
|
Kanji=SJIS
|
||||||
[Source]
|
[Source]
|
||||||
Geometry=212, 6, 902, 1043
|
Geometry=278, 33, 715, 1006
|
||||||
Window=Normal
|
Window=Normal
|
||||||
DispStart=11
|
DispStart=431
|
||||||
CaretPos=81,0
|
CaretPos=432,0
|
||||||
Mode=Normal
|
Mode=Normal
|
||||||
DispFile=
|
DispFile=
|
||||||
Address1=
|
Address1=
|
||||||
@ -139,19 +139,11 @@ SaveRange=Screen
|
|||||||
SaveStart=
|
SaveStart=
|
||||||
SaveEnd=
|
SaveEnd=
|
||||||
Accumulative=ON
|
Accumulative=ON
|
||||||
[Source1]
|
|
||||||
Geometry=32, 50, 771, 1011
|
|
||||||
Window=Normal
|
|
||||||
DispStart=453
|
|
||||||
CaretPos=506,17
|
|
||||||
Mode=Normal
|
|
||||||
DispFile=\\tsclient\C\78k_data\yav-mcu-basara\trunk\pedo_alg_thre_det2.c
|
|
||||||
Accumulative=ON
|
|
||||||
[Assemble]
|
[Assemble]
|
||||||
Geometry=574, 49, 600, 400
|
Geometry=0, 0, 0, 0
|
||||||
Window=Normal
|
Window=Hide
|
||||||
DispStart=802
|
DispStart=847434752
|
||||||
CaretPos=802,27
|
CaretPos=0,0
|
||||||
Address1=
|
Address1=
|
||||||
Address2=
|
Address2=
|
||||||
Address3=
|
Address3=
|
||||||
@ -259,9 +251,9 @@ Destination=0
|
|||||||
[I/O Port]
|
[I/O Port]
|
||||||
Line=0
|
Line=0
|
||||||
[Stack]
|
[Stack]
|
||||||
Geometry=1141, 319, 400, 300
|
Geometry=0, 0, 0, 0
|
||||||
Window=Normal
|
Window=Hide
|
||||||
Boundary=13762687
|
Boundary=0
|
||||||
Mode=Proper
|
Mode=Proper
|
||||||
[Sfr]
|
[Sfr]
|
||||||
Geometry=0, 0, 0, 0
|
Geometry=0, 0, 0, 0
|
||||||
@ -822,9 +814,9 @@ L529=IICWL1
|
|||||||
L530=IICWH1
|
L530=IICWH1
|
||||||
L531=SVA1
|
L531=SVA1
|
||||||
[Local Variable]
|
[Local Variable]
|
||||||
Geometry=1150, 803, 400, 300
|
Geometry=0, 0, 0, 0
|
||||||
Window=Normal
|
Window=Hide
|
||||||
Boundary=13041851
|
Boundary=0
|
||||||
Mode=Proper
|
Mode=Proper
|
||||||
[Trace View]
|
[Trace View]
|
||||||
Geometry=0, 0, 0, 0
|
Geometry=0, 0, 0, 0
|
||||||
@ -965,20 +957,20 @@ Detail=OFF
|
|||||||
Last Name=
|
Last Name=
|
||||||
Count=0
|
Count=0
|
||||||
[Variable]
|
[Variable]
|
||||||
Geometry=1110, 10, 440, 300
|
Geometry=945, 6, 644, 1042
|
||||||
Window=Normal
|
Window=Normal
|
||||||
Boundary=13762700
|
Boundary=13762700
|
||||||
0=+cal_log_latest,.,N,A,-,1
|
0=.vreg_ctr,P,N,A,+,1
|
||||||
1=.last_hour_fny,D,N,A,+,1
|
1=.tdr05,P,S,A,+,1
|
||||||
2=.now_longhour,D,N,A,+,1
|
2=.system_status,.,N,A,+,1
|
||||||
Line=3
|
Line=3
|
||||||
[Quick Watch]
|
[Quick Watch]
|
||||||
0=cal_buff,P,A,1
|
0=tdr05,P,A,1
|
||||||
1=rv,P,A,1
|
1=vreg_ctr,P,A,1
|
||||||
2=iic_burst_state,P,A,1
|
2=system_status,P,A,1
|
||||||
3=now_longhour,P,A,1
|
3=
|
||||||
4=last_hour_fny,P,A,1
|
4=
|
||||||
5=cal_log_latest,P,A,1
|
5=
|
||||||
6=
|
6=
|
||||||
7=
|
7=
|
||||||
8=
|
8=
|
||||||
@ -994,18 +986,14 @@ Geometry=0, 0, 0, 0
|
|||||||
Window=Hide
|
Window=Hide
|
||||||
Width=150 30 200 100
|
Width=150 30 200 100
|
||||||
Name0=Swb00003
|
Name0=Swb00003
|
||||||
Address0=pedo_alg_thre_det2.c#_get_long_hour+0x7b
|
Address0=led.c#_led_pow_bt_empty+0x0
|
||||||
Window0=ASM
|
Window0=ASM
|
||||||
Status0=ON
|
Status0=ON
|
||||||
Name1=Swb00001
|
Name1=Swb00001
|
||||||
Address1=pedo_alg_thre_det2.c#_hosu_increment_if_necessary+0x55
|
Address1=led.c#_tsk_led_pow+0x7e
|
||||||
Window1=ASM
|
Window1=ASM
|
||||||
Status1=ON
|
Status1=ON
|
||||||
Name2=Swb00002
|
Count=2
|
||||||
Address2=pedo_alg_thre_det2.c#_calc_hours_spend+0x28
|
|
||||||
Window2=ASM
|
|
||||||
Status2=ON
|
|
||||||
Count=3
|
|
||||||
[Reset]
|
[Reset]
|
||||||
Debugger=ON
|
Debugger=ON
|
||||||
Symbol=OFF
|
Symbol=OFF
|
||||||
|
|||||||
@ -23,7 +23,7 @@ MuitiLoad=0
|
|||||||
LoadPrjNum=0
|
LoadPrjNum=0
|
||||||
CheckVersion=CC78K0R|W2.13;RA78K0R|W1.33
|
CheckVersion=CC78K0R|W2.13;RA78K0R|W1.33
|
||||||
[Option.IDK0R32G]
|
[Option.IDK0R32G]
|
||||||
File=yav_mcu_bsr.pri
|
File=\\tsclient\C\78k_data\yav-mcu-basara\trunk\yav_mcu_bsr.pri
|
||||||
[BuildMode2]
|
[BuildMode2]
|
||||||
BuildModeName=K0R_dbg
|
BuildModeName=K0R_dbg
|
||||||
TargetFile=0
|
TargetFile=0
|
||||||
@ -840,7 +840,7 @@ G=1
|
|||||||
E=0
|
E=0
|
||||||
E0=flash.elk
|
E0=flash.elk
|
||||||
E1=a.elk
|
E1=a.elk
|
||||||
GO=0
|
GO=1
|
||||||
GOValue=85
|
GOValue=85
|
||||||
GOStart=FC00
|
GOStart=FC00
|
||||||
GOSizeValue=1024
|
GOSizeValue=1024
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[ProjectManager]
|
[ProjectManager]
|
||||||
FrameMax=0
|
FrameMax=0
|
||||||
FrameX=447
|
FrameX=307
|
||||||
FrameY=116
|
FrameY=88
|
||||||
FrameCX=1435
|
FrameCX=1435
|
||||||
FrameCY=1045
|
FrameCY=1045
|
||||||
OpenFile1=jhl_defs.h,0,286,286,1530,1012,0,15,26,0
|
OpenFile1=jhl_defs.h,0,286,286,1530,1012,0,15,26,0
|
||||||
@ -9,17 +9,11 @@ OpenFile2=self_flash.c,0,352,352,1596,1078,0,142,5,0
|
|||||||
OpenFile3=ini_VECT.c,0,330,330,1574,1056,6,93,6,0
|
OpenFile3=ini_VECT.c,0,330,330,1574,1056,6,93,6,0
|
||||||
OpenFile4=renge\renge.c,0,348,332,1592,1058,0,31,0,0
|
OpenFile4=renge\renge.c,0,348,332,1592,1058,0,31,0,0
|
||||||
OpenFile5=renge\renge.h,0,264,264,1508,990,3,4,3,0
|
OpenFile5=renge\renge.h,0,264,264,1508,990,3,4,3,0
|
||||||
OpenFile6=adc.c,0,220,220,1464,946,8,230,8,0
|
OpenFile6=ProjectWindow
|
||||||
OpenFile7=config.h,0,242,242,1486,968,0,40,0,0
|
|
||||||
OpenFile8=led.c,0,264,264,1508,990,0,731,0,0
|
|
||||||
OpenFile9=task_misc.c,0,286,286,1530,1012,65,141,69,0
|
|
||||||
OpenFile10=main.c,0,220,220,1464,946,3,27,1,0
|
|
||||||
OpenFile11=i2c_mcu.c,0,308,308,1552,1034,10,76,7,0
|
|
||||||
OpenFile12=ProjectWindow
|
|
||||||
PrjPos=0,0,706,0,291
|
PrjPos=0,0,706,0,291
|
||||||
OpenFile13=OutputWindow
|
OpenFile7=pedo_alg_thre_det2.c,0,72,264,1187,865,0,398,0,0
|
||||||
OutputPos=0,58,764,389,1336
|
OpenFile8=OutputWindow
|
||||||
OpenFile14=task_sys.c,0,465,262,1709,988,27,35,27,0
|
OutputPos=0,34,740,376,1323
|
||||||
ActivePRJ=yav_mcu_bsr.prj
|
ActivePRJ=yav_mcu_bsr.prj
|
||||||
[ProjectWindow]
|
[ProjectWindow]
|
||||||
ProjectWindowDispType=0
|
ProjectWindowDispType=0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user