Обновление платы на V2
This commit is contained in:
parent
21c9cfdfe4
commit
ea574290bf
152
Adcs.c
152
Adcs.c
|
|
@ -19,7 +19,7 @@ void Bsp_ADC1_HandleResult(const uint32_t *const pBuffer) {
|
|||
}
|
||||
|
||||
|
||||
#define ADC0_CHN_NUM_EN 29
|
||||
#define ADC0_CHN_NUM_EN 31
|
||||
static uint32_t s_aAdc0ResultBuf[ADC0_CHN_NUM_EN] = {0U};
|
||||
static const ADC_ChannelCfgType s_aChannelsAdc0[ADC0_CHN_NUM_EN] =
|
||||
{
|
||||
|
|
@ -167,12 +167,23 @@ static const ADC_ChannelCfgType s_aChannelsAdc0[ADC0_CHN_NUM_EN] =
|
|||
{
|
||||
.eChannel = ADC_CHANNEL_31, //PD31: Reserve_Sensor_Duct_Temp_2
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_29, //PC6: Sensor_PT_rHVAC_P
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_24, //PE2: Sensor_A_T_reserve
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
#define ADC1_CHN_NUM_EN 5
|
||||
#define ADC1_CHN_NUM_EN 16
|
||||
static uint32_t s_aAdc1ResultBuf[ADC1_CHN_NUM_EN] = {0U};
|
||||
static const ADC_ChannelCfgType s_aChannelsAdc1[ADC1_CHN_NUM_EN] =
|
||||
{
|
||||
|
|
@ -200,9 +211,69 @@ static const ADC_ChannelCfgType s_aChannelsAdc1[ADC1_CHN_NUM_EN] =
|
|||
{
|
||||
.eChannel = ADC_CHANNEL_4, //PE11: tVN7008AJ_RearLINActuatorPowerDriverC
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_9, //PA6: PT_F_HVAC_VCC_DIAG
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_18, //PB14: PT_HVBchiller_VCC_DIAG
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_28, //PB8: PT_R_HVAC_VCC_DIAG
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_17, //PB15: Sensor_PT_fHVAC_P
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_8, //PE7: Sensor_PT_fHVAC_T
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_20, //PC25: Sensor_PT_rHVAC_T
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_21, //PC26: Sensor_HVBchiller_P
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_24, //PD25: Sensor_HVBchiller_T
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_25, //PB9: Sensor_PT_P_reserve
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_26, //PD26: Sensor_PT_T_reserve
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
},
|
||||
|
||||
{
|
||||
.eChannel = ADC_CHANNEL_30, //PA0: Sensor_B_T_reserve
|
||||
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_3
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -261,7 +332,7 @@ void Adcs_Init(tLoggerInterface *logger) {
|
|||
PORT_InitPins(PORT_E, &tInitStruct);
|
||||
|
||||
//PE13: Sensor_Rear_Evap_Temp
|
||||
tInitStruct.u32PortPins = PORT_PIN_5;
|
||||
tInitStruct.u32PortPins = PORT_PIN_13;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTE_13_ADC0_SE5;
|
||||
PORT_InitPins(PORT_E, &tInitStruct);
|
||||
|
||||
|
|
@ -275,8 +346,8 @@ void Adcs_Init(tLoggerInterface *logger) {
|
|||
tInitStruct.uPortPinMux.u32PortPinMode = PORTA_28_ADC0_SE7;
|
||||
PORT_InitPins(PORT_A, &tInitStruct);
|
||||
|
||||
//PD17: Sensor_Rear_Duct2
|
||||
tInitStruct.u32PortPins = PORT_PIN_28;
|
||||
// PD17: Sensor_Rear_Duct2
|
||||
tInitStruct.u32PortPins = PORT_PIN_17;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTD_17_ADC0_SE8;
|
||||
PORT_InitPins(PORT_D, &tInitStruct);
|
||||
|
||||
|
|
@ -385,6 +456,17 @@ void Adcs_Init(tLoggerInterface *logger) {
|
|||
tInitStruct.uPortPinMux.u32PortPinMode = PORTD_31_ADC0_SE31;
|
||||
PORT_InitPins(PORT_D, &tInitStruct);
|
||||
|
||||
|
||||
//PC6: Sensor_PT_rHVAC_P
|
||||
tInitStruct.u32PortPins = PORT_PIN_6;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTC_6_ADC0_SE29;
|
||||
PORT_InitPins(PORT_C, &tInitStruct);
|
||||
|
||||
//PE2: Sensor_A_T_reserve
|
||||
tInitStruct.u32PortPins = PORT_PIN_2;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTE_2_ADC0_SE24;
|
||||
PORT_InitPins(PORT_E, &tInitStruct);
|
||||
|
||||
ADC_Initial(
|
||||
&env->adc_0,
|
||||
ADC_INSTANCE_0, // ADC_INSTANCE_0, ADC_INSTANCE_1
|
||||
|
|
@ -439,6 +521,64 @@ void Adcs_Init(tLoggerInterface *logger) {
|
|||
tInitStruct.uPortPinMux.u32PortPinMode = PORTE_11_ADC1_SE4;
|
||||
PORT_InitPins(PORT_E, &tInitStruct);
|
||||
|
||||
//PA6: PT_F_HVAC_VCC_DIAG
|
||||
tInitStruct.u32PortPins = PORT_PIN_6;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTA_6_ADC1_SE9;
|
||||
PORT_InitPins(PORT_A, &tInitStruct);
|
||||
|
||||
//PB14: PT_HVBchiller_VCC_DIAG
|
||||
tInitStruct.u32PortPins = PORT_PIN_14;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTB_14_ADC1_SE18;
|
||||
PORT_InitPins(PORT_B, &tInitStruct);
|
||||
|
||||
//PB8: PT_R_HVAC_VCC_DIAG
|
||||
tInitStruct.u32PortPins = PORT_PIN_8;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTB_8_ADC1_SE28;
|
||||
PORT_InitPins(PORT_B, &tInitStruct);
|
||||
|
||||
|
||||
|
||||
//PB15: Sensor_PT_fHVAC_P
|
||||
tInitStruct.u32PortPins = PORT_PIN_15;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTB_15_ADC1_SE17;
|
||||
PORT_InitPins(PORT_B, &tInitStruct);
|
||||
|
||||
//PE7: Sensor_PT_fHVAC_T
|
||||
tInitStruct.u32PortPins = PORT_PIN_7;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTE_7_ADC1_SE8;
|
||||
PORT_InitPins(PORT_B, &tInitStruct);
|
||||
|
||||
//PC25: Sensor_PT_rHVAC_T
|
||||
tInitStruct.u32PortPins = PORT_PIN_25;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTC_25_ADC1_SE20;
|
||||
PORT_InitPins(PORT_C, &tInitStruct);
|
||||
|
||||
//PC26: Sensor_HVBchiller_P
|
||||
tInitStruct.u32PortPins = PORT_PIN_26;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTC_26_ADC1_SE21;
|
||||
PORT_InitPins(PORT_C, &tInitStruct);
|
||||
|
||||
//PD25: Sensor_HVBchiller_T
|
||||
tInitStruct.u32PortPins = PORT_PIN_25;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTD_25_ADC1_SE24;
|
||||
PORT_InitPins(PORT_D, &tInitStruct);
|
||||
|
||||
//PB9: Sensor_PT_P_reserve
|
||||
tInitStruct.u32PortPins = PORT_PIN_9;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTB_9_ADC1_SE25;
|
||||
PORT_InitPins(PORT_B, &tInitStruct);
|
||||
|
||||
//PD26: Sensor_PT_T_reserve
|
||||
tInitStruct.u32PortPins = PORT_PIN_26;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTD_26_ADC1_SE26;
|
||||
PORT_InitPins(PORT_D, &tInitStruct);
|
||||
|
||||
//PA0: Sensor_B_T_reserve
|
||||
tInitStruct.u32PortPins = PORT_PIN_0;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORTA_0_ADC1_SE30;
|
||||
PORT_InitPins(PORT_A, &tInitStruct);
|
||||
|
||||
|
||||
ADC_Initial(
|
||||
&env->adc_1,
|
||||
ADC_INSTANCE_1, // ADC_INSTANCE_0, ADC_INSTANCE_1
|
||||
|
|
|
|||
Loading…
Reference in New Issue