켈리브레이션 설정값 버그 수정

master
imbis 3 months ago
parent 69cf079196
commit 682cdde8c2

@ -37,6 +37,8 @@ bool App_Gpio_I2C_Write(uint8_t Address, uint8_t* pWriteData, uint32_t TxSize);
bool App_Gpio_I2C_Read(uint8_t Address, uint8_t* pReadData, uint32_t RxSize); bool App_Gpio_I2C_Read(uint8_t Address, uint8_t* pReadData, uint32_t RxSize);
#endif #endif
int main(void) int main(void)
{ {
ICC_Enable(); ICC_Enable();
@ -56,13 +58,6 @@ int main(void)
App_Led_OutputSet(APP_LED_1, APP_LED_MODE_TOGGLE, 100, 900); App_Led_OutputSet(APP_LED_1, APP_LED_MODE_TOGGLE, 100, 900);
SW_Timer_Callback_Register(SW_TIMER_RUN_CONTINUE, 1000,Test_Process ); SW_Timer_Callback_Register(SW_TIMER_RUN_CONTINUE, 1000,Test_Process );
while(1) while(1)
{ {

@ -360,7 +360,7 @@ static bool AK9757W_Set_XCOEF4_0_Parameter(void)
static bool AK9757W_Set_IR_TS_IT_Parameter(void) static bool AK9757W_Set_IR_TS_IT_Parameter(void)
{ {
int error; int error;
uint8_t i; uint8_t i;
Eeprom_Get_Parameter(&ParameterInfo); Eeprom_Get_Parameter(&ParameterInfo);
if(ParameterInfo.Parameter_Info.isSaveParameter == AK9757W_MAGIC_KEY) if(ParameterInfo.Parameter_Info.isSaveParameter == AK9757W_MAGIC_KEY)
@ -376,24 +376,29 @@ static bool AK9757W_Set_IR_TS_IT_Parameter(void)
} }
if(ParameterInfo.Parameter_Info.CheckSum == CheckSum && readChipID == pHandler->SensorID) if(ParameterInfo.Parameter_Info.CheckSum == CheckSum && readChipID == pHandler->SensorID)
{ {
for(i = 0 ; i < 9 ; i ++) for(i = 0 ; i < 9 ; i ++)
{ {
pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[i] = ParameterInfo.Parameter_Buff[EE_INDEX_PA_53 + i]; pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[1+i] = ParameterInfo.Parameter_Buff[EE_INDEX_PA_53 + i];
} }
dbg_printf(LOG_LEVEL_DEBUG, "Parameter write eeprom\r\n"); dbg_printf(LOG_LEVEL_DEBUG, "Parameter write eeprom\r\n");
} }
else else
{ {
memcpy(&pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[0], &default_gir_oir_gts_ots_git_reg_data[1], (sizeof(default_gir_oir_gts_ots_git_reg_data)-1)); memcpy(&pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[0], &default_gir_oir_gts_ots_git_reg_data[0], (sizeof(default_gir_oir_gts_ots_git_reg_data)));
} }
} }
else else
{ {
memcpy(&pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[0], &default_gir_oir_gts_ots_git_reg_data[1], (sizeof(default_gir_oir_gts_ots_git_reg_data)-1)); memcpy(&pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[0], &default_gir_oir_gts_ots_git_reg_data[0], (sizeof(default_gir_oir_gts_ots_git_reg_data)));
} }
error = I2C_Master_Write(TEMP_I2C_ADDRESS, &default_gir_oir_gts_ots_git_reg_data[0], sizeof(default_gir_oir_gts_ots_git_reg_data));
pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[0] = AK9757W_REG_PARAMETER;
pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[1] = 0xE0; // default value
error = I2C_Master_Write(TEMP_I2C_ADDRESS, &pHandler->IR_TS_IT_Info.IR_TS_IT_Buff[0], sizeof(pHandler->IR_TS_IT_Info.IR_TS_IT_Buff));
if(error != E_NO_ERROR) if(error != E_NO_ERROR)
{ {
dbg_printf(LOG_LEVEL_DEBUG, "I2C IR_TS_IT write Error %d\r\n", error); dbg_printf(LOG_LEVEL_DEBUG, "I2C IR_TS_IT write Error %d\r\n", error);

@ -299,7 +299,6 @@ typedef union
{ {
struct struct
{ {
uint8_t addr;
uint8_t xcoef4_l; uint8_t xcoef4_l;
uint8_t xcoef4_h; uint8_t xcoef4_h;
uint8_t xcoef4_ex; uint8_t xcoef4_ex;
@ -322,6 +321,7 @@ typedef union
{ {
struct struct
{ {
uint8_t addr;
uint8_t reserved; uint8_t reserved;
uint8_t gir_l; uint8_t gir_l;
uint8_t gir_h; uint8_t gir_h;
@ -332,7 +332,7 @@ typedef union
uint8_t ots_h; uint8_t ots_h;
uint8_t git; uint8_t git;
}IR_TS_IT; }IR_TS_IT;
uint8_t IR_TS_IT_Buff[9]; uint8_t IR_TS_IT_Buff[10];
}IR_TS_IT_INFO; }IR_TS_IT_INFO;

File diff suppressed because one or more lines are too long

@ -152,9 +152,25 @@
<Bp> <Bp>
<Number>0</Number> <Number>0</Number>
<Type>0</Type> <Type>0</Type>
<LineNumber>365</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>9396</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\Application\sensor\ak9757w.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\AKM_Temperature_Demo\../Application/sensor/ak9757w.c\365</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>810</LineNumber> <LineNumber>810</LineNumber>
<EnabledFlag>1</EnabledFlag> <EnabledFlag>1</EnabledFlag>
<Address>8786</Address> <Address>8978</Address>
<ByteObject>0</ByteObject> <ByteObject>0</ByteObject>
<HtxType>0</HtxType> <HtxType>0</HtxType>
<ManyObjects>0</ManyObjects> <ManyObjects>0</ManyObjects>
@ -165,6 +181,22 @@
<ExecCommand></ExecCommand> <ExecCommand></ExecCommand>
<Expression>\\AKM_Temperature_Demo\../Application/sensor/ak9757w.c\810</Expression> <Expression>\\AKM_Temperature_Demo\../Application/sensor/ak9757w.c\810</Expression>
</Bp> </Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>378</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>9450</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\Application\sensor\ak9757w.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\AKM_Temperature_Demo\../Application/sensor/ak9757w.c\378</Expression>
</Bp>
</Breakpoint> </Breakpoint>
<WatchWindow1> <WatchWindow1>
<Ww> <Ww>
@ -240,7 +272,7 @@
<Group> <Group>
<GroupName>Application</GroupName> <GroupName>Application</GroupName>
<tvExp>0</tvExp> <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>

@ -322,7 +322,7 @@
<PlainCh>0</PlainCh> <PlainCh>0</PlainCh>
<Ropi>0</Ropi> <Ropi>0</Ropi>
<Rwpi>0</Rwpi> <Rwpi>0</Rwpi>
<wLevel>2</wLevel> <wLevel>1</wLevel>
<uThumb>0</uThumb> <uThumb>0</uThumb>
<uSurpInc>0</uSurpInc> <uSurpInc>0</uSurpInc>
<uC99>1</uC99> <uC99>1</uC99>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save