mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-10-31 13:51:10 -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@84 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
parent
6cd9cf5bf1
commit
f0291ac8f6
@ -2,7 +2,7 @@
|
|||||||
#define __config__
|
#define __config__
|
||||||
|
|
||||||
#define _debug_
|
#define _debug_
|
||||||
#define _debug_led_
|
// #define _debug_led_
|
||||||
|
|
||||||
|
|
||||||
#define MCU_VER_MAJOR 0x00
|
#define MCU_VER_MAJOR 0x00
|
||||||
|
|||||||
@ -110,7 +110,9 @@ __interrupt void int_iic_ctr( )
|
|||||||
|
|
||||||
if( STD ) // 割り込み要因:スタートコンディション
|
if( STD ) // 割り込み要因:スタートコンディション
|
||||||
{
|
{
|
||||||
if( ( state == IIC_TX ) || ( state == IIC_RX ) )
|
if( ( state == IIC_TX ) || ( state == IIC_RX )
|
||||||
|
|| ( state == IIC_RCV_REG_ADRS )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
state = IIC_IDLE;
|
state = IIC_IDLE;
|
||||||
// no break //
|
// no break //
|
||||||
|
|||||||
@ -78,7 +78,7 @@ void tsk_misc_stat( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//#ifdef _MCU_KE3_
|
#ifdef _MCU_KE3_
|
||||||
// KE3では必須です。
|
// KE3では必須です。
|
||||||
/* ========================================================
|
/* ========================================================
|
||||||
加速度センサ割り込みピンがオリジナルマイコンには無いので
|
加速度センサ割り込みピンがオリジナルマイコンには無いので
|
||||||
@ -91,11 +91,12 @@ void tsk_misc_stat( )
|
|||||||
{
|
{
|
||||||
if( ACC_VALID )
|
if( ACC_VALID )
|
||||||
{
|
{
|
||||||
renge_task_immed_add( tsk_cbk_accero );
|
if( renge_task_immed_add( tsk_cbk_accero ) == ERR_SUCCESS ){
|
||||||
NOP();
|
NOP();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
// 割り込みの取りこぼし?
|
// 割り込みの取りこぼし?
|
||||||
if( !PM_IRQ_n ){
|
if( !PM_IRQ_n ){
|
||||||
|
|||||||
@ -238,10 +238,13 @@ void vreg_ctr_write( u8 adrs, u8 data )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ( VREG_C_ACC_HOSU_SETTING ):
|
case ( VREG_C_ACC_HOSU_SETTING ):
|
||||||
fill_hosu_hist_hours( 0 ); // 履歴クリア
|
if( ( data & 0x01 ) != 0 )
|
||||||
vreg_ctr[ VREG_C_ACC_HOSU_L ] = 0;
|
{
|
||||||
vreg_ctr[ VREG_C_ACC_HOSU_M ] = 0;
|
fill_hosu_hist_hours( 0 ); // 履歴クリア
|
||||||
vreg_ctr[ VREG_C_ACC_HOSU_H ] = 0;
|
vreg_ctr[ VREG_C_ACC_HOSU_L ] = 0;
|
||||||
|
vreg_ctr[ VREG_C_ACC_HOSU_M ] = 0;
|
||||||
|
vreg_ctr[ VREG_C_ACC_HOSU_H ] = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ( VREG_C_COMMAND3 ):
|
case ( VREG_C_COMMAND3 ):
|
||||||
|
|||||||
@ -3,10 +3,6 @@ C:\WINDOWS\system32\cmd.exe /c touch magic.c
|
|||||||
Compilation complete, 0 error(s) and 0 warning(s) found.
|
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
|
"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.
|
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 -quvjl3wt -sainter_asm -zp -no renge\renge.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\renge.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 -kp -gb6EFBFFh -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 ini_VECT.rel led.rel rtc.rel vreg_ctr.rel vreg_twl.rel adc.rel renge.rel accero.rel self_flash.rel reboot.rel sw.rel task_debug.rel task_misc.rel task_sys.rel
|
"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 -kp -gb6EFBFFh -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 ini_VECT.rel led.rel rtc.rel vreg_ctr.rel vreg_twl.rel adc.rel renge.rel accero.rel self_flash.rel reboot.rel sw.rel task_debug.rel task_misc.rel task_sys.rel
|
||||||
Link complete, 0 error(s) and 0 warning(s) found.
|
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
|
"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
|
||||||
|
|||||||
@ -22,7 +22,7 @@ SubClock=None
|
|||||||
[Mapping]
|
[Mapping]
|
||||||
Count=0
|
Count=0
|
||||||
[Main]
|
[Main]
|
||||||
Geometry=25, 22, 1467, 1110
|
Geometry=115, 23, 1467, 1110
|
||||||
Window=Normal
|
Window=Normal
|
||||||
MDI_MAX=OFF
|
MDI_MAX=OFF
|
||||||
Button=ON
|
Button=ON
|
||||||
@ -78,7 +78,7 @@ Symbol Type=OFF
|
|||||||
Language=C
|
Language=C
|
||||||
Kanji=SJIS
|
Kanji=SJIS
|
||||||
[Source]
|
[Source]
|
||||||
Geometry=274, 329, 1012, 623
|
Geometry=173, 154, 1012, 920
|
||||||
Window=Normal
|
Window=Normal
|
||||||
DispStart=209
|
DispStart=209
|
||||||
CaretPos=210,0
|
CaretPos=210,0
|
||||||
@ -139,19 +139,11 @@ SaveRange=Screen
|
|||||||
SaveStart=
|
SaveStart=
|
||||||
SaveEnd=
|
SaveEnd=
|
||||||
Accumulative=ON
|
Accumulative=ON
|
||||||
[Source1]
|
|
||||||
Geometry=50, 50, 1019, 857
|
|
||||||
Window=Normal
|
|
||||||
DispStart=37
|
|
||||||
CaretPos=53,11
|
|
||||||
Mode=Normal
|
|
||||||
DispFile=accero.c
|
|
||||||
Accumulative=ON
|
|
||||||
[Assemble]
|
[Assemble]
|
||||||
Geometry=605, 2, 600, 400
|
Geometry=605, 2, 600, 400
|
||||||
Window=Normal
|
Window=Normal
|
||||||
DispStart=14015
|
DispStart=14008
|
||||||
CaretPos=14015,27
|
CaretPos=14008,27
|
||||||
Address1=
|
Address1=
|
||||||
Address2=
|
Address2=
|
||||||
Address3=
|
Address3=
|
||||||
@ -866,71 +858,61 @@ Count=0
|
|||||||
Geometry=1225, 6, 354, 910
|
Geometry=1225, 6, 354, 910
|
||||||
Window=Normal
|
Window=Normal
|
||||||
Boundary=13762700
|
Boundary=13762700
|
||||||
0=+pool,P,N,A,-,1
|
0=.new_task,.,N,A,+,1
|
||||||
1=.new_task,.,N,A,+,1
|
1=.if2h,P,S,A,+,1
|
||||||
2=.vreg_ctr,P,N,A,+,1
|
2=.pool,P,N,A,+,1
|
||||||
3=.cmd_BL,P,N,A,+,1
|
3=.new_task,.,N,A,+,1
|
||||||
4=.P7,B,S,A,+,1
|
4=.vreg_ctr,P,N,A,+,1
|
||||||
5=.p5,B,S,A,+,1
|
5=.cmd_BL,P,N,A,+,1
|
||||||
Line=6
|
6=.P7,B,S,A,+,1
|
||||||
|
7=.p5,B,S,A,+,1
|
||||||
|
Line=8
|
||||||
[Quick Watch]
|
[Quick Watch]
|
||||||
0=rtciimk,P,A,1
|
0=SEC,P,A,1
|
||||||
1=wdte,P,A,1
|
1=rtcif,P,A,1
|
||||||
2=SEC,P,A,1
|
2=vreg_twl,P,A,1
|
||||||
3=rtcif,P,A,1
|
3=pm0,P,A,1
|
||||||
4=vreg_twl,P,A,1
|
4=data,P,A,1
|
||||||
5=pm0,P,A,1
|
5=P5.3,P,A,1
|
||||||
6=data,P,A,1
|
6=p4.3,P,A,1
|
||||||
7=P5.3,P,A,1
|
7=pu0,P,A,1
|
||||||
8=p4.3,P,A,1
|
8=p5,B,A,1
|
||||||
9=pu0,P,A,1
|
9=P7,B,A,1
|
||||||
10=p5,B,A,1
|
10=cmd_BL,P,A,1
|
||||||
11=P7,B,A,1
|
11=vreg_ctr,P,A,1
|
||||||
12=cmd_BL,P,A,1
|
12=pool,P,A,1
|
||||||
13=vreg_ctr,P,A,1
|
13=if2,P,A,1
|
||||||
14=new_task,P,A,1
|
14=if2h,P,A,1
|
||||||
15=pool,P,A,1
|
15=new_task,P,A,1
|
||||||
[Software Break]
|
[Software Break]
|
||||||
Geometry=1204, 674, 500, 428
|
Geometry=1204, 674, 500, 428
|
||||||
Window=Normal
|
Window=Normal
|
||||||
Width=150 30 200 100
|
Width=150 30 200 100
|
||||||
Name0=Swb00003
|
Name0=Swb00001
|
||||||
Address0=renge.c#_renge_task_immed_add+0x3a
|
Address0=self_flash.c#_firm_duplicate+0x72
|
||||||
Window0=ASM
|
Window0=ASM
|
||||||
Status0=ON
|
Status0=ON
|
||||||
Name1=Swb00001
|
Name1=Swb00002
|
||||||
Address1=self_flash.c#_firm_duplicate+0x72
|
Address1=self_flash.c#_firm_duplicate+0x87
|
||||||
Window1=ASM
|
Window1=ASM
|
||||||
Status1=ON
|
Status1=ON
|
||||||
Name2=Swb00002
|
Name2=Swb00005
|
||||||
Address2=self_flash.c#_firm_duplicate+0x87
|
Address2=self_flash.c#_firm_duplicate+0x82
|
||||||
Window2=ASM
|
Window2=ASM
|
||||||
Status2=ON
|
Status2=ON
|
||||||
Name3=Swb00005
|
Name3=Swb00006
|
||||||
Address3=self_flash.c#_firm_duplicate+0x82
|
Address3=self_flash.c#_firm_duplicate+0x0
|
||||||
Window3=ASM
|
Window3=ASM
|
||||||
Status3=ON
|
Status3=ON
|
||||||
Name4=Swb00006
|
Name4=Swb00010
|
||||||
Address4=self_flash.c#_firm_duplicate+0x0
|
Address4=renge.c#_renge_task_immed_run+0xe3
|
||||||
Window4=ASM
|
Window4=ASM
|
||||||
Status4=ON
|
Status4=ON
|
||||||
Name5=Swb00010
|
Name5=Swb00003
|
||||||
Address5=renge.c#_renge_task_immed_run+0xe6
|
Address5=task_misc.c#_do_command0+0x10
|
||||||
Window5=ASM
|
Window5=ASM
|
||||||
Status5=ON
|
Status5=ON
|
||||||
Name6=Swb00004
|
Count=6
|
||||||
Address6=renge.c#_renge_task_immed_run+0x4c
|
|
||||||
Window6=ASM
|
|
||||||
Status6=ON
|
|
||||||
Name7=Swb00007
|
|
||||||
Address7=renge.c#_renge_task_immed_run+0xba
|
|
||||||
Window7=ASM
|
|
||||||
Status7=ON
|
|
||||||
Name8=Swb00008
|
|
||||||
Address8=renge.c#_renge_task_immed_run+0x12e
|
|
||||||
Window8=ASM
|
|
||||||
Status8=ON
|
|
||||||
Count=9
|
|
||||||
[Reset]
|
[Reset]
|
||||||
Debugger=ON
|
Debugger=ON
|
||||||
Symbol=OFF
|
Symbol=OFF
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user