mirror of
https://github.com/rvtr/ctr_mcu.git
synced 2025-10-31 13:51:10 -04:00
CTRとTWLのVolをアトミックに更新しなければいけないのを忘れていた
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@91 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
parent
d854ecc379
commit
889af25286
@ -89,10 +89,6 @@ void tsk_adc( )
|
|||||||
// hysterisis_vol = ( vol_old <= vreg_ctr[VREG_C_SND_VOL] )? 2: 0;
|
// hysterisis_vol = ( vol_old <= vreg_ctr[VREG_C_SND_VOL] )? 2: 0;
|
||||||
// vol_old = vreg_ctr[VREG_C_SND_VOL];
|
// vol_old = vreg_ctr[VREG_C_SND_VOL];
|
||||||
|
|
||||||
// TWL用レジスタの更新
|
|
||||||
vreg_twl[ REG_TWL_INT_ADRS_VOL ] = vreg_ctr[VREG_C_SND_VOL] / ( 256 / 32 ); // 8段の割り込み
|
|
||||||
// 割り込みはHorizonを通してコマンドを発行されるのを待てばよい
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
class = ( vreg_ctr[VREG_C_SND_VOL] + hysterisis_vol ) / ( 256 / 8 ); // 32段の割り込み
|
class = ( vreg_ctr[VREG_C_SND_VOL] + hysterisis_vol ) / ( 256 / 8 ); // 32段の割り込み
|
||||||
if( class != class_old )
|
if( class != class_old )
|
||||||
@ -225,6 +221,9 @@ case ( ADC_SEL_AMB_BRIT ):
|
|||||||
case ( ADC_SEL_VOL ):
|
case ( ADC_SEL_VOL ):
|
||||||
hist_snd_vol[index] = ADCRH;
|
hist_snd_vol[index] = ADCRH;
|
||||||
vreg_ctr[VREG_C_SND_VOL] = getmean3( hist_snd_vol );
|
vreg_ctr[VREG_C_SND_VOL] = getmean3( hist_snd_vol );
|
||||||
|
// TWL用レジスタの更新
|
||||||
|
vreg_twl[ REG_TWL_INT_ADRS_VOL ] = vreg_ctr[VREG_C_SND_VOL] / ( 256 / 32 ); // 8段の割り込み
|
||||||
|
// 割り込みはHorizonを通してコマンドを発行されるのを待てばよい
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ( ADC_SEL_BATT_TEMP ):
|
case ( ADC_SEL_BATT_TEMP ):
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#define _OVERCLOCK_
|
#define _OVERCLOCK_
|
||||||
|
|
||||||
#define PM_CCIC_TIM
|
//#define PM_CCIC_TIM
|
||||||
|
|
||||||
// 古い(C)電源ボード
|
// 古い(C)電源ボード
|
||||||
//#define _PM_BUG_
|
//#define _PM_BUG_
|
||||||
|
|||||||
@ -118,6 +118,9 @@
|
|||||||
#ifdef PM_CCIC_TIM
|
#ifdef PM_CCIC_TIM
|
||||||
#define PM_CHG_TIMEOUT_ENABLE() ( P5.0 = 0 )
|
#define PM_CHG_TIMEOUT_ENABLE() ( P5.0 = 0 )
|
||||||
#define PM_CHG_TIMEOUT_DISABLE() ( P5.0 = 1 )
|
#define PM_CHG_TIMEOUT_DISABLE() ( P5.0 = 1 )
|
||||||
|
#else
|
||||||
|
#define PM_CHG_TIMEOUT_ENABLE() ;
|
||||||
|
#define PM_CHG_TIMEOUT_DISABLE() ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <20>[“d’†(in)
|
// <20>[“d’†(in)
|
||||||
|
|||||||
@ -42,6 +42,10 @@ Assembly complete, 0 error(s) and 0 warning(s) found.
|
|||||||
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\i2c_twl.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\i2c_twl.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 ini_VECT.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\ini_VECT.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 -quvjl3wt -sainter_asm -zp -no led.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 -quvjl3wt -sainter_asm -zp -no led.c
|
||||||
led.c(457) : CC78K0R warning W0401: Conversion may lose significant digits
|
led.c(457) : CC78K0R warning W0401: Conversion may lose significant digits
|
||||||
Compilation complete, 0 error(s) and 1 warning(s) found.
|
Compilation complete, 0 error(s) and 1 warning(s) found.
|
||||||
@ -72,11 +76,15 @@ Compilation complete, 0 error(s) and 2 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\vreg_twl.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\vreg_twl.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 adc.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 -quvjl3wt -sainter_asm -zp -no adc.c
|
||||||
adc.c(93) : CC78K0R warning W0401: Conversion may lose significant digits
|
adc.c(225) : CC78K0R warning W0401: Conversion may lose significant digits
|
||||||
adc.c(255) : CC78K0R warning W0401: Conversion may lose significant digits
|
adc.c(254) : CC78K0R warning W0401: Conversion may lose significant digits
|
||||||
Compilation complete, 0 error(s) and 2 warning(s) found.
|
Compilation complete, 0 error(s) and 2 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
|
"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.
|
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\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 accero.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 -quvjl3wt -sainter_asm -zp -no accero.c
|
||||||
accero.c(110) : CC78K0R warning W0745: Expected function prototype
|
accero.c(110) : CC78K0R warning W0745: Expected function prototype
|
||||||
accero.c(119) : CC78K0R warning W0401: Conversion may lose significant digits
|
accero.c(119) : CC78K0R warning W0401: Conversion may lose significant digits
|
||||||
|
|||||||
@ -4,7 +4,7 @@ Target=IDK0R32G
|
|||||||
[Configuration]
|
[Configuration]
|
||||||
Chip=uPD79F0104
|
Chip=uPD79F0104
|
||||||
Internal Rom=32KB
|
Internal Rom=32KB
|
||||||
Internal Ram=1536KB
|
Internal Ram=1536B
|
||||||
Clock=Target
|
Clock=Target
|
||||||
Sub Clock=Target
|
Sub Clock=Target
|
||||||
Peripheral Break=0x2
|
Peripheral Break=0x2
|
||||||
@ -22,8 +22,8 @@ SubClock=None
|
|||||||
[Mapping]
|
[Mapping]
|
||||||
Count=0
|
Count=0
|
||||||
[Main]
|
[Main]
|
||||||
Geometry=115, 23, 1467, 1110
|
Geometry=65, 39, 1467, 1110
|
||||||
Window=Icon
|
Window=Max
|
||||||
MDI_MAX=OFF
|
MDI_MAX=OFF
|
||||||
Button=ON
|
Button=ON
|
||||||
Mode=Auto
|
Mode=Auto
|
||||||
@ -78,10 +78,10 @@ Symbol Type=OFF
|
|||||||
Language=C
|
Language=C
|
||||||
Kanji=SJIS
|
Kanji=SJIS
|
||||||
[Source]
|
[Source]
|
||||||
Geometry=173, 154, 1012, 920
|
Geometry=155, 80, 1012, 920
|
||||||
Window=Normal
|
Window=Normal
|
||||||
DispStart=41
|
DispStart=276
|
||||||
CaretPos=90,0
|
CaretPos=277,0
|
||||||
Mode=Normal
|
Mode=Normal
|
||||||
DispFile=
|
DispFile=
|
||||||
Address1=
|
Address1=
|
||||||
@ -142,8 +142,8 @@ Accumulative=ON
|
|||||||
[Assemble]
|
[Assemble]
|
||||||
Geometry=605, 2, 600, 400
|
Geometry=605, 2, 600, 400
|
||||||
Window=Normal
|
Window=Normal
|
||||||
DispStart=650
|
DispStart=16965
|
||||||
CaretPos=650,27
|
CaretPos=16965,27
|
||||||
Address1=
|
Address1=
|
||||||
Address2=
|
Address2=
|
||||||
Address3=
|
Address3=
|
||||||
@ -251,7 +251,7 @@ Destination=0
|
|||||||
[I/O Port]
|
[I/O Port]
|
||||||
Line=0
|
Line=0
|
||||||
[Stack]
|
[Stack]
|
||||||
Geometry=1118, 354, 400, 300
|
Geometry=1128, 373, 400, 300
|
||||||
Window=Normal
|
Window=Normal
|
||||||
Boundary=13762687
|
Boundary=13762687
|
||||||
Mode=Proper
|
Mode=Proper
|
||||||
@ -858,58 +858,43 @@ Count=0
|
|||||||
Geometry=1225, 6, 354, 910
|
Geometry=1225, 6, 354, 910
|
||||||
Window=Normal
|
Window=Normal
|
||||||
Boundary=13762700
|
Boundary=13762700
|
||||||
0=.tx_buf,P,N,A,+,1
|
0=.iic_mcu_busy,P,N,A,+,1
|
||||||
1=.new_task,P,N,A,+,1
|
1=.tx_buf,P,N,A,+,1
|
||||||
2=.if2h,P,S,A,+,1
|
2=.new_task,P,N,A,+,1
|
||||||
3=.pool,P,N,A,+,1
|
3=.if2h,P,S,A,+,1
|
||||||
4=.new_task,P,N,A,+,1
|
4=.pool,P,N,A,+,1
|
||||||
5=.vreg_ctr,P,N,A,+,1
|
5=.new_task,P,N,A,+,1
|
||||||
6=.cmd_BL,P,N,A,+,1
|
6=.vreg_ctr,P,N,A,+,1
|
||||||
7=.P7,B,S,A,+,1
|
7=.cmd_BL,P,N,A,+,1
|
||||||
8=.p5,B,S,A,+,1
|
8=.P7,B,S,A,+,1
|
||||||
Line=9
|
9=.p5,B,S,A,+,1
|
||||||
|
Line=10
|
||||||
[Quick Watch]
|
[Quick Watch]
|
||||||
0=rtcif,P,A,1
|
0=vreg_twl,P,A,1
|
||||||
1=vreg_twl,P,A,1
|
1=pm0,P,A,1
|
||||||
2=pm0,P,A,1
|
2=data,P,A,1
|
||||||
3=data,P,A,1
|
3=P5.3,P,A,1
|
||||||
4=P5.3,P,A,1
|
4=p4.3,P,A,1
|
||||||
5=p4.3,P,A,1
|
5=pu0,P,A,1
|
||||||
6=pu0,P,A,1
|
6=p5,B,A,1
|
||||||
7=p5,B,A,1
|
7=P7,B,A,1
|
||||||
8=P7,B,A,1
|
8=cmd_BL,P,A,1
|
||||||
9=cmd_BL,P,A,1
|
9=vreg_ctr,P,A,1
|
||||||
10=vreg_ctr,P,A,1
|
10=pool,P,A,1
|
||||||
11=pool,P,A,1
|
11=if2,P,A,1
|
||||||
12=if2,P,A,1
|
12=if2h,P,A,1
|
||||||
13=if2h,P,A,1
|
13=new_task,P,A,1
|
||||||
14=new_task,P,A,1
|
14=tx_buf,P,A,1
|
||||||
15=tx_buf,P,A,1
|
15=iic_mcu_busy,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=Swb00001
|
Name0=Swb00001
|
||||||
Address0=self_flash.c#_firm_duplicate+0x72
|
Address0=vreg_twl.c#_vreg_twl_read+0x6e
|
||||||
Window0=ASM
|
Window0=ASM
|
||||||
Status0=ON
|
Status0=ON
|
||||||
Name1=Swb00002
|
Count=1
|
||||||
Address1=self_flash.c#_firm_duplicate+0x87
|
|
||||||
Window1=ASM
|
|
||||||
Status1=ON
|
|
||||||
Name2=Swb00005
|
|
||||||
Address2=self_flash.c#_firm_duplicate+0x82
|
|
||||||
Window2=ASM
|
|
||||||
Status2=ON
|
|
||||||
Name3=Swb00006
|
|
||||||
Address3=self_flash.c#_firm_duplicate+0x0
|
|
||||||
Window3=ASM
|
|
||||||
Status3=ON
|
|
||||||
Name4=Swb00003
|
|
||||||
Address4=task_misc.c#_do_command0+0x10
|
|
||||||
Window4=ASM
|
|
||||||
Status4=ON
|
|
||||||
Count=5
|
|
||||||
[Reset]
|
[Reset]
|
||||||
Debugger=ON
|
Debugger=ON
|
||||||
Symbol=OFF
|
Symbol=OFF
|
||||||
|
|||||||
@ -7,11 +7,11 @@ FrameCY=1043
|
|||||||
OpenFile1=task_sys.c,0,521,328,1765,1085,25,250,25,0
|
OpenFile1=task_sys.c,0,521,328,1765,1085,25,250,25,0
|
||||||
OpenFile2=renge\renge.h,0,502,637,1746,1394,29,16,29,0
|
OpenFile2=renge\renge.h,0,502,637,1746,1394,29,16,29,0
|
||||||
OpenFile3=i2c_twl.c,0,31,261,1010,897,25,31,25,0
|
OpenFile3=i2c_twl.c,0,31,261,1010,897,25,31,25,0
|
||||||
OpenFile4=ProjectWindow
|
OpenFile4=config.h,0,255,3,1234,639,0,21,19,0
|
||||||
PrjPos=0,2,754,3,253
|
OpenFile5=OutputWindow
|
||||||
OpenFile5=config.h,0,255,3,1234,639,0,19,21,0
|
|
||||||
OpenFile6=OutputWindow
|
|
||||||
OutputPos=0,421,829,388,1497
|
OutputPos=0,421,829,388,1497
|
||||||
|
OpenFile6=ProjectWindow
|
||||||
|
PrjPos=0,2,754,3,253
|
||||||
ActivePRJ=yav_mcu_bsr.prj
|
ActivePRJ=yav_mcu_bsr.prj
|
||||||
[ProjectWindow]
|
[ProjectWindow]
|
||||||
ProjectWindowDispType=0
|
ProjectWindowDispType=0
|
||||||
|
|||||||
@ -11,7 +11,7 @@ T=4b445f00
|
|||||||
7=rtc.h
|
7=rtc.h
|
||||||
8=reboot.h
|
8=reboot.h
|
||||||
[pm.c]
|
[pm.c]
|
||||||
T=4b6638b8
|
T=4b667a4d
|
||||||
1=incs.h
|
1=incs.h
|
||||||
2=adc.h
|
2=adc.h
|
||||||
3=led.h
|
3=led.h
|
||||||
@ -32,7 +32,7 @@ T=4b57fe0b
|
|||||||
6=led.h
|
6=led.h
|
||||||
7=adc.h
|
7=adc.h
|
||||||
[magic.c]
|
[magic.c]
|
||||||
T=4b663897
|
T=4b6686ff
|
||||||
1=config.h
|
1=config.h
|
||||||
[WDT.c]
|
[WDT.c]
|
||||||
T=4afd21ca
|
T=4afd21ca
|
||||||
@ -66,14 +66,14 @@ T=4b60da5e
|
|||||||
7=..\..\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\inc78k0r\fsl.h
|
7=..\..\Program Files\NEC Electronics Tools\FSL78K0R_Type02ES\V1.20\inc78k0r\fsl.h
|
||||||
8=fsl_user.h
|
8=fsl_user.h
|
||||||
[vreg_twl.c]
|
[vreg_twl.c]
|
||||||
T=4b1c8d36
|
T=4b667aab
|
||||||
1=incs.h
|
1=incs.h
|
||||||
2=jhl_defs.h
|
2=jhl_defs.h
|
||||||
3=vreg_twl.h
|
3=vreg_twl.h
|
||||||
4=vreg_ctr.h
|
4=vreg_ctr.h
|
||||||
5=renge\renge_task_intval.h
|
5=renge\renge_task_intval.h
|
||||||
[adc.c]
|
[adc.c]
|
||||||
T=4b62a102
|
T=4b667a0d
|
||||||
1=incs.h
|
1=incs.h
|
||||||
2=adc.h
|
2=adc.h
|
||||||
3=pm.h
|
3=pm.h
|
||||||
@ -148,7 +148,7 @@ T=4b023fdb
|
|||||||
[user_define.h]
|
[user_define.h]
|
||||||
T=4b663267
|
T=4b663267
|
||||||
[config.h]
|
[config.h]
|
||||||
T=4b663267
|
T=4b6686db
|
||||||
[bsr_system.h]
|
[bsr_system.h]
|
||||||
T=4b3064de
|
T=4b3064de
|
||||||
[renge\renge.h]
|
[renge\renge.h]
|
||||||
@ -161,7 +161,7 @@ T=4b32f836
|
|||||||
T=4b42ee65
|
T=4b42ee65
|
||||||
1=renge\renge_defs.h
|
1=renge\renge_defs.h
|
||||||
[vreg_ctr.h]
|
[vreg_ctr.h]
|
||||||
T=4b4d8094
|
T=4b667aa5
|
||||||
1=config.h
|
1=config.h
|
||||||
[loader.h]
|
[loader.h]
|
||||||
T=4afd21ca
|
T=4afd21ca
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user