testfktionen auscommentiert, always on always on ?
This commit is contained in:
@ -38,20 +38,19 @@ void ChannelControl_UpdateGPIOs(PortExtenderGPIO UpdatePorts) { // ctrl + left c
|
||||
UpdatePorts.porta.alwayson = 1;// Always on stays always on
|
||||
PCA9535_setGPIOPortOutput(PC9535_PORTA, UpdatePorts.porta.porta);
|
||||
PCA9535_setGPIOPortOutput(PC9535_PORTB, UpdatePorts.portb.portb);
|
||||
gpio_port_b testb={};
|
||||
testb.en16=1;
|
||||
PCA9535_setGPIOPortOutput(PC9535_PORTB, testb.portb);
|
||||
gpio_port_a testa={};
|
||||
testa.en1=1;
|
||||
PCA9535_setGPIOPortOutput(PC9535_PORTA, testa.porta);
|
||||
|
||||
|
||||
UpdatePorts.porta.alwayson = 1;
|
||||
// gpio_port_b testb={}; (testing code)
|
||||
//testb.en16=1; (testing code)
|
||||
//PCA9535_setGPIOPortOutput(PC9535_PORTB, testb.portb); (testing code)
|
||||
// gpio_port_a testa={}; (testing code)
|
||||
// testa.en1=1; (testing code)
|
||||
// testa.en13=1; (testing code)
|
||||
// PCA9535_setGPIOPortOutput(PC9535_PORTA, testa.porta); (testing code)
|
||||
}
|
||||
|
||||
void ChannelControl_UpdatePWMs(uint8_t radiatorfans,uint8_t tsacfans , uint8_t pwmaggregat,
|
||||
uint8_t pwmpumps){
|
||||
|
||||
return;
|
||||
|
||||
pwmtimer3->Instance->CCR4 = pwmpumps << 8;
|
||||
pwmtimer3->Instance->CCR1 = radiatorfans << 8;
|
||||
|
||||
@ -133,8 +133,9 @@ int main(void)
|
||||
can_init(&hcan); // can bus initilisiert , kommunikation zum hauptsteuergeraet ( autobox )
|
||||
currentMonitor_init(&hadc1, &hadc2, &htim6);
|
||||
uint32_t lasttick = HAL_GetTick(); // gibt dir zuruck die milisekunden seit start. ( es fangt an und dann milisekunden + 1 usw....)
|
||||
HAL_TIM_Base_Start(&htim2);
|
||||
HAL_TIM_Base_Start(&htim2);
|
||||
HAL_TIM_Base_Start(&htim3);
|
||||
// ChannelControl_UpdatePWMs(20 , 50 , 0 , 50 ); ( testing code )
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
@ -443,7 +444,7 @@ static void MX_TIM2_Init(void)
|
||||
htim2.Instance = TIM2;
|
||||
htim2.Init.Prescaler = 0;
|
||||
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
htim2.Init.Period = 4294967295;
|
||||
htim2.Init.Period = 65535;
|
||||
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
|
||||
|
||||
Reference in New Issue
Block a user