20240816开始修改代码
This commit is contained in:
parent
ed84735e60
commit
7bfd32e0f8
File diff suppressed because it is too large
Load Diff
@ -78,8 +78,8 @@ typedef struct{
|
||||
* Private variables
|
||||
*/
|
||||
const UI_8 NVM_DID_CD_VIN[DLC_DID_CD_VIN] = GAC_VIN_DEFAULT_VALUE;
|
||||
const UI_8 NVM_Reprogramming_Date_App[DLC_DID_REPROGRAMMING_DATE] = {0x20,0x24,0x07,0x22};
|
||||
const UI_8 NVM_DID_CD_SUPPLIER_ID[DLC_SYSTEM_SUPPLIER_ID] = {'2','4','0','7','2','2'};
|
||||
const UI_8 NVM_Reprogramming_Date_App[DLC_DID_REPROGRAMMING_DATE] = {0x20,0x24,0x07,0x27};
|
||||
const UI_8 NVM_DID_CD_SUPPLIER_ID[DLC_SYSTEM_SUPPLIER_ID] = {'2','4','0','7','2','7'};
|
||||
const UI_8 NVM_Repair_Shop_Code[DLC_REPAIR_SHOP_CODE] = GAC_ECU_REPAIR_SHOP_CODE;
|
||||
const UI_8 NVM_DID_CD_HW_VERSION[DLC_GAC_HW_VERSION] = {'H','W','0','5',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20};
|
||||
static uint8 RAM_DID_CD_VIN[DLC_DID_CD_VIN];
|
||||
@ -813,7 +813,8 @@ t_UDS_ERR Get_DID_GAC_Repair_Shop_Id(uint8 *data)
|
||||
{
|
||||
//memcpy(data, RAM_DID_REPAIR_SHOP_CODE,DLC_REPAIR_SHOP_CODE);
|
||||
SmartEE_Read(0x51B, data, 16);
|
||||
return ISO15765_3_POSITIVE_RESPONSE;
|
||||
|
||||
return ISO15765_3_POSITIVE_RESPONSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,6 +22,7 @@ void FunctionState_Task(void)
|
||||
if (adcResetFlag == 0)
|
||||
{
|
||||
ADC1_Initialize();
|
||||
ADC1_Enable();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -608,8 +608,9 @@ uint8_t RTE_Get_TouchBoard_XY_Sts(void)//Not active,Touch,Touch and Press,invali
|
||||
{
|
||||
//PanelPress_LevelType Press_Level;
|
||||
Buttons_SignalType XY_Sts = BUTTON_RELEASE;
|
||||
|
||||
if((Two_Finger_Y_count<=4 && Y_count == Two_Finger_Y_count)&&(Two_Finger_X_count<=4 && X_count == Two_Finger_X_count))
|
||||
// 触发的通道数量 //连续触发的通道数量
|
||||
//if((Two_Finger_Y_count<=4 && Y_count == Two_Finger_Y_count)&&(Two_Finger_X_count<=4 && X_count == Two_Finger_X_count))
|
||||
if(Allow_Touch_flag == 1)
|
||||
{
|
||||
//Allow_Touch_flag=1;
|
||||
XY_Sts = TouchSurface_XY_StsRead();
|
||||
@ -620,12 +621,6 @@ uint8_t RTE_Get_TouchBoard_XY_Sts(void)//Not active,Touch,Touch and Press,invali
|
||||
g_XY_Touch_And_Below_1N = 0x00;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Allow_Touch_flag=0;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
if (Two_Finger_Y_count > 4 && Two_Finger_X_count > 4)
|
||||
@ -740,9 +735,18 @@ uint8_t RTE_Get_TouchBoard_XY_Touch_And_Below_1N(void) // 0 false 1 true
|
||||
else
|
||||
X_count++;
|
||||
}
|
||||
|
||||
|
||||
// 触发的通道数量 //连续触发的通道数量
|
||||
if((Two_Finger_Y_count<=4 && Y_count == Two_Finger_Y_count)&&(Two_Finger_X_count<=4 && X_count == Two_Finger_X_count))
|
||||
{
|
||||
/* code */
|
||||
}
|
||||
else
|
||||
{
|
||||
Allow_Touch_flag = 0;
|
||||
}
|
||||
|
||||
//if((Two_Finger_Y_count<=4 && Y_count == Two_Finger_Y_count)&&(Two_Finger_X_count<=4 && X_count == Two_Finger_X_count))
|
||||
if(Allow_Touch_flag == 1)
|
||||
{
|
||||
if(g_XY_Touch_And_Below_1N == TRUE && CurrentPosition>=4)
|
||||
{
|
||||
|
@ -36,15 +36,15 @@
|
||||
|
||||
#define CW_BUS_CTRL_2 (0x0) /*decimal 0*/
|
||||
|
||||
#define CW_GPIO_CTRL (0x0) /*decimal 0*/
|
||||
#define CW_GPIO_CTRL (0x24) /*decimal 36*/
|
||||
|
||||
#define CW_HS_CTRL1 (0x0) /*decimal 0*/
|
||||
|
||||
#define CW_HS_CTRL2 (0x0) /*decimal 0*/
|
||||
|
||||
#define CW_HW_CTRL (0x80) /*decimal 128*/
|
||||
#define CW_HW_CTRL (0x9) /*decimal 9*/
|
||||
|
||||
#define CW_M_S_CTRL (0x18) /*decimal 8*/
|
||||
#define CW_M_S_CTRL (0x1C) /*decimal 28*/
|
||||
|
||||
#define CW_PWM1_CTRL (0x0) /*decimal 0*/
|
||||
|
||||
@ -92,15 +92,15 @@
|
||||
|
||||
#define CW_TIMER2_CTRL (0x0) /*decimal 0*/
|
||||
|
||||
#define CW_WD_CTRL (0x4) /*decimal 4*/
|
||||
#define CW_WD_CTRL (0x84) /*decimal 132*/
|
||||
|
||||
#define CW_WK_CTRL_1 (0x0) /*decimal 0*/
|
||||
|
||||
#define CW_WK_CTRL_2 (0x7) /*decimal 7*/
|
||||
#define CW_WK_CTRL_2 (0x0) /*decimal 0*/
|
||||
|
||||
#define CW_WK_FLT_CTRL (0x0) /*decimal 0*/
|
||||
|
||||
#define CW_WK_PUPD_CTRL (0x3F) /*decimal 63*/
|
||||
#define CW_WK_PUPD_CTRL (0x0) /*decimal 0*/
|
||||
|
||||
#define LED_EXTENDED_ID (0x1) /*decimal 1*/
|
||||
|
||||
@ -120,6 +120,6 @@
|
||||
|
||||
#define UI_SWK_MASK_IDx_CTRL 0x00000000
|
||||
|
||||
#define UI_VARIANT (0x3) /*decimal 3*/
|
||||
#define UI_VARIANT (0x5) /*decimal 5*/
|
||||
|
||||
#endif /* SBC_TLE926X_H */
|
||||
|
@ -206,11 +206,14 @@ SBC_ErrorCode sbc_init(void) {
|
||||
|
||||
/* Describes initialization sequence.
|
||||
init Sequence containing {reg_address, reg_value}*/
|
||||
uint8_t initSequence[4][2] = {
|
||||
uint8_t initSequence[8][2] = {
|
||||
{SBC_WD_CTRL, WD_CTRL},//0x04 TimeOut; 200ms period
|
||||
{SBC_M_S_CTRL, CW_M_S_CTRL},//0x18 SBC normal;vcc3off;vcc2 on in normal;
|
||||
{SBC_BUS_CTRL_1, CW_BUS_CTRL_1},//0x03 lin off; can normal
|
||||
|
||||
{SBC_WK_CTRL_2, CW_WK_CTRL_2},
|
||||
{SBC_HW_CTRL, CW_HW_CTRL},
|
||||
{SBC_GPIO_CTRL, CW_GPIO_CTRL},
|
||||
{SBC_WK_PUPD_CTRL, CW_WK_PUPD_CTRL},
|
||||
/* End Configuration */
|
||||
{0x00U, 0x00U}
|
||||
};
|
||||
|
@ -1,24 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<icwpxml version="2.6.4">
|
||||
<checksum>938a5187cdcc759f78b6bae262f689a50c384e539a95618defe57f554fa7fafd</checksum>
|
||||
<checksum>b31f5011f3959a9e7cc2c9ca70f9a9d697b17587a54185c423e628478807656e</checksum>
|
||||
<XmlFile>TLE926x_Lib.xml</XmlFile>
|
||||
<XmlVersion>V0.0.1</XmlVersion>
|
||||
<ActiveElements>
|
||||
<CheckBox>
|
||||
<define>CW.M_S_CTRL[2]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<ComboBox>
|
||||
<define>CW.M_S_CTRL[1:0]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<CheckBox>
|
||||
<define>CW.HW_CTRL[3]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.HW_CTRL[1]</define>
|
||||
<value>0</value>
|
||||
@ -34,21 +24,11 @@
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<CheckBox>
|
||||
<define>CW.BUS_CTRL_1[5]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.BUS_CTRL_1[6]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.BUS_CTRL_1[7]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>MATH.EN_PN</define>
|
||||
<value>0</value>
|
||||
@ -79,11 +59,6 @@
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<Slider>
|
||||
<define>CW.SWK_BTL2_CTRL[5:0]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</Slider>
|
||||
<CheckBox>
|
||||
<define>CW.SWK_ID0_CTRL[0]</define>
|
||||
<value>0</value>
|
||||
@ -114,16 +89,6 @@
|
||||
<value>0x00000000</value>
|
||||
<dispValue>0x00000000</dispValue>
|
||||
</LineEdit>
|
||||
<ComboBox>
|
||||
<define>CW.GPIO_CTRL[2:0]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<ComboBox>
|
||||
<define>CW.GPIO_CTRL[5:3]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<ComboBox>
|
||||
<define>CW.GPIO_CTRL[7:6]</define>
|
||||
<value>0</value>
|
||||
@ -134,11 +99,6 @@
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.HW_CTRL[0]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.HW_CTRL[5]</define>
|
||||
<value>0</value>
|
||||
@ -164,21 +124,6 @@
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.WK_CTRL_2[0]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.WK_CTRL_2[1]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.WK_CTRL_2[2]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<ComboBox>
|
||||
<define>CW.WK_FLT_CTRL[1:0]</define>
|
||||
<value>0</value>
|
||||
@ -279,50 +224,105 @@
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<ButtonGroup>
|
||||
<define>UI.VARIANT</define>
|
||||
<value>3</value>
|
||||
<dispValue>3</dispValue>
|
||||
</ButtonGroup>
|
||||
<ButtonGroup>
|
||||
<define>CW.M_S_CTRL[4:3]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</ButtonGroup>
|
||||
<ComboBox>
|
||||
<define>CW.BUS_CTRL_1[2:0]</define>
|
||||
<value>3</value>
|
||||
<dispValue>3</dispValue>
|
||||
</ComboBox>
|
||||
<ComboBox>
|
||||
<define>CW.BUS_CTRL_1[4:3]</define>
|
||||
<value>3</value>
|
||||
<dispValue>3</dispValue>
|
||||
</ComboBox>
|
||||
<ComboBox>
|
||||
<define>CW.WD_CTRL[2:0]</define>
|
||||
<value>6</value>
|
||||
<dispValue>6</dispValue>
|
||||
</ComboBox>
|
||||
<CheckBox>
|
||||
<define>CW.HW_CTRL[7]</define>
|
||||
<value>1</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<ComboBox>
|
||||
<define>CW.BUS_CTRL_1[4:3]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<ButtonGroup>
|
||||
<define>UI.VARIANT</define>
|
||||
<value>5</value>
|
||||
<dispValue>5</dispValue>
|
||||
</ButtonGroup>
|
||||
<ComboBox>
|
||||
<define>CW.GPIO_CTRL[2:0]</define>
|
||||
<value>4</value>
|
||||
<dispValue>4</dispValue>
|
||||
</ComboBox>
|
||||
<ComboBox>
|
||||
<define>CW.GPIO_CTRL[5:3]</define>
|
||||
<value>4</value>
|
||||
<dispValue>4</dispValue>
|
||||
</ComboBox>
|
||||
<CheckBox>
|
||||
<define>CW.M_S_CTRL[2]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<ButtonGroup>
|
||||
<define>CW.M_S_CTRL[4:3]</define>
|
||||
<value>3</value>
|
||||
<dispValue>3</dispValue>
|
||||
</ButtonGroup>
|
||||
<CheckBox>
|
||||
<define>CW.HW_CTRL[3]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.BUS_CTRL_1[5]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.BUS_CTRL_1[7]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<Slider>
|
||||
<define>CW.SWK_BTL2_CTRL[5:0]</define>
|
||||
<value>52</value>
|
||||
<dispValue>52</dispValue>
|
||||
</Slider>
|
||||
<CheckBox>
|
||||
<define>CW.HW_CTRL[0]</define>
|
||||
<value>1</value>
|
||||
<dispValue>1</dispValue>
|
||||
</CheckBox>
|
||||
<ComboBox>
|
||||
<define>CW.WD_CTRL[2:0]</define>
|
||||
<value>4</value>
|
||||
<dispValue>4</dispValue>
|
||||
</ComboBox>
|
||||
<CheckBox>
|
||||
<define>CW.WK_CTRL_2[0]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.WK_CTRL_2[1]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<CheckBox>
|
||||
<define>CW.WK_CTRL_2[2]</define>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</CheckBox>
|
||||
<ComboBox>
|
||||
<define>CW.WK_PUPD_CTRL[1:0]</define>
|
||||
<value>3</value>
|
||||
<dispValue>3</dispValue>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<ComboBox>
|
||||
<define>CW.WK_PUPD_CTRL[3:2]</define>
|
||||
<value>3</value>
|
||||
<dispValue>3</dispValue>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
<ComboBox>
|
||||
<define>CW.WK_PUPD_CTRL[5:4]</define>
|
||||
<value>3</value>
|
||||
<dispValue>3</dispValue>
|
||||
<value>0</value>
|
||||
<dispValue>0</dispValue>
|
||||
</ComboBox>
|
||||
</ActiveElements>
|
||||
</icwpxml>
|
@ -1715,8 +1715,7 @@ void TouchPanel_MainFunction(void)
|
||||
|
||||
|
||||
if(Vibra_force_level == 2 && last_Vibra_force_level != 2
|
||||
&&((Two_Finger_Y_count<=4 && Y_count == Two_Finger_Y_count)&&(Two_Finger_X_count<=4 && X_count == Two_Finger_X_count))
|
||||
)
|
||||
&&Allow_Touch_flag)//((Two_Finger_Y_count<=4 && Y_count == Two_Finger_Y_count)&&(Two_Finger_X_count<=4 && X_count == Two_Finger_X_count))
|
||||
{
|
||||
Over3N_vibra_req = 1;
|
||||
Below1P5N_vibra_req = 0;
|
||||
|
@ -209,6 +209,19 @@ void IhuPrivateDHUCanFr01_Timeout_CALLBACK(void)
|
||||
// *****************************************************************************
|
||||
// *****************************************************************************
|
||||
static uint32_t status = 0;
|
||||
uint8_t g_SBC_STATUS[8] = {0};
|
||||
void GetResetSource(void)
|
||||
{
|
||||
g_SBC_STATUS[0] = (uint8_t)sbc_read_reg(SBC_SUP_STAT_2);
|
||||
g_SBC_STATUS[1] = (uint8_t)sbc_read_reg(SBC_SUP_STAT_1);
|
||||
g_SBC_STATUS[2] = (uint8_t)sbc_read_reg(SBC_DEV_STAT);
|
||||
g_SBC_STATUS[3] = RSTC_REGS->RSTC_RCAUSE;
|
||||
g_SBC_STATUS[4] = RSTC_REGS->RSTC_BKUPEXIT;
|
||||
g_SBC_STATUS[5] = 0x00;
|
||||
g_SBC_STATUS[6] = 0x00;
|
||||
g_SBC_STATUS[7] = 0x00;
|
||||
CanTx(0,true,0x420,8,g_SBC_STATUS);
|
||||
}
|
||||
|
||||
int main ( void )
|
||||
{
|
||||
@ -236,6 +249,9 @@ int main ( void )
|
||||
|
||||
forcedetect_Init();
|
||||
TouchPanel_init();
|
||||
//sbc_write_reg(SBC_M_S_CTRL,0x18,0);
|
||||
|
||||
|
||||
Tle9263_Init();
|
||||
//touch_init();//test:11ms
|
||||
//sbc_wd_trigger();
|
||||
@ -265,7 +281,7 @@ int main ( void )
|
||||
{
|
||||
Test_frame_On = 1;
|
||||
}
|
||||
|
||||
GetResetSource();
|
||||
Fuction_State = Function_State_A;
|
||||
while ( true )
|
||||
{
|
||||
@ -287,30 +303,30 @@ int main ( void )
|
||||
/* call touch process function */
|
||||
if(Fuction_State == Function_State_A)
|
||||
{
|
||||
TouchPanel_MainFunction();
|
||||
speaker_MainTask();
|
||||
forcedetect_MainTask();
|
||||
|
||||
//TCC0_PWM24bitDutySet(TCC0_CHANNEL0,6999);
|
||||
RTE_Set_All_Test_Value();
|
||||
TouchPanel_MainFunction();
|
||||
speaker_MainTask();
|
||||
forcedetect_MainTask();
|
||||
|
||||
//TCC0_PWM24bitDutySet(TCC0_CHANNEL0,6999);
|
||||
RTE_Set_All_Test_Value();
|
||||
}
|
||||
else
|
||||
{
|
||||
//(void)TCC0_PWM24bitDutySet(TCC0_CHANNEL0, 0); //turn off led
|
||||
//TC0_Compare8bitMatch1Set(0);//turn off led
|
||||
//TC1_Compare8bitMatch0Set(0);//turn off led
|
||||
//(void)TCC0_PWM24bitDutySet(TCC0_CHANNEL0, 0); //turn off led
|
||||
//TC0_Compare8bitMatch1Set(0);//turn off led
|
||||
//TC1_Compare8bitMatch0Set(0);//turn off led
|
||||
}
|
||||
|
||||
if(Fuction_State != Function_State_C)
|
||||
{
|
||||
TPTask(ISO15765_2_REPROGONCAN_HANDLER);
|
||||
Iso15765_3Task();
|
||||
Dem_MainFunction();
|
||||
TPTask(ISO15765_2_REPROGONCAN_HANDLER);
|
||||
Iso15765_3Task();
|
||||
Dem_MainFunction();
|
||||
}
|
||||
Calib_Task();
|
||||
Calib_Task();
|
||||
|
||||
//SBC VCC2 always on Setting
|
||||
sbc_write_reg(SBC_M_S_CTRL,0x18,0);
|
||||
//SBC VCC2 always on Setting
|
||||
sbc_write_reg(SBC_M_S_CTRL,0x18,0);
|
||||
|
||||
}
|
||||
|
||||
@ -325,10 +341,9 @@ int main ( void )
|
||||
status = CAN1_ErrorGet();
|
||||
|
||||
WDT_Clear();
|
||||
//if(Fuction_State == Function_State_A)
|
||||
//{
|
||||
P417_SWTL_App_step();
|
||||
//}
|
||||
|
||||
P417_SWTL_App_step();
|
||||
|
||||
CyclicTskSchM_TimerSync();
|
||||
loop_counter++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user