79 static volatile uint16_t
test = 0;
95 static volatile uint16_t
VDC_bus[] = {0, 0};
98 static volatile uint16_t
Temp[] = {0, 0, 0};
177 10, 11, 12, 14, 15, 17, 20, 24, 28, \
178 29, 31, 33, 35, 37, 41, 43, 47, 51, 56};
216 __attribute__((section(
".ram_code")))
220 if(XMC_USIC_CH_RXFIFO_GetLevel(UART_XMC13.channel))
222 retval = (uint16_t) UART_XMC13.channel->OUTR;
228 if ((UART_XMC13.channel->RBUFSR & 0x200))
271 __attribute__((section(
".ram_code")))
283 else if (ps_on.gpio_port->IN & 0x8)
297 else if (!(ps_on.gpio_port->IN & 0x8))
360 XMC_CCU8_SLICE_StopTimer(llc_pwm.ccu8_slice_ptr);
361 XMC_CCU8_SLICE_StopTimer(sync1.ccu8_slice_ptr);
362 XMC_CCU8_SLICE_StopTimer(sync2.ccu8_slice_ptr);
365 XMC_CCU8_SLICE_ClearTimer(llc_pwm.ccu8_slice_ptr);
366 XMC_CCU8_SLICE_ClearTimer(sync1.ccu8_slice_ptr);
367 XMC_CCU8_SLICE_ClearTimer(sync2.ccu8_slice_ptr);
371 llc_pwm.ccu8_slice_ptr->PRS =
PR_START;
373 llc_pwm.ccu8_slice_ptr->CR2S =
ADC_START;
380 sync1.ccu8_slice_ptr->CR1S = 0;
384 sync2.ccu8_slice_ptr->CR1S = 0;
392 XMC_CCU8_SLICE_StartTimer(sync1.ccu8_slice_ptr);
393 XMC_CCU8_SLICE_StartTimer(sync2.ccu8_slice_ptr);
402 NVIC_ClearPendingIRQ(start_sequence.node);
403 NVIC_EnableIRQ(start_sequence.node);
443 CCU80_CC83->CR1S = 0;
444 CCU80->GCSS |= CCU8_GCSS_S3SE_Msk;
461 NVIC_ClearPendingIRQ(HRPWM_3_IRQn);
462 NVIC_DisableIRQ(HRPWM_3_IRQn);
491 XMC_GPIO_SetOutputLow(P0_7);
492 XMC_GPIO_SetOutputHigh(P0_8);
511 XMC_VADC_GROUP_QueueTriggerConversion(VADC_G0);
515 CCU80_CC83->CR1S = 0xFFFF;
516 CCU80->GCSS |= CCU8_GCSS_S3SE_Msk;
523 XMC_GPIO_SetOutputLow(P0_7);
524 XMC_GPIO_SetOutputLow(P0_8);
533 llc_pwm.ccu8_slice_ptr->TCSET |= CCU8_CC8_TCSET_TRBS_Msk;
607 CCU80_CC83->CR1S = 0xFFFF;
608 CCU80->GCSS |= CCU8_GCSS_S3SE_Msk;
651 __attribute__((section(
".ram_code")))
762 if (voltage_int_ctr.
error[0] < 150)
811 voltage_int_ctr.
error[2] = voltage_int_ctr.
error[0];
812 voltage_int_ctr.
error[1] = voltage_int_ctr.
error[0];
825 voltage_int_ctr.
int_calc = (int32_t)voltage_int_ctr.
a[0] * (int32_t)voltage_int_ctr.
error[0];
826 voltage_int_ctr.
int_calc += (int32_t)voltage_int_ctr.
a[1] * (int32_t)voltage_int_ctr.
error[1];
827 voltage_int_ctr.
int_calc += (int32_t)voltage_int_ctr.
a[2] * (int32_t)voltage_int_ctr.
error[2];
875 llc_pwm.ccu8_slice_ptr->PRS = *voltage_int_ctr.
output;
877 llc_pwm.ccu8_slice_ptr->CR2S = (*voltage_int_ctr.
output >> 2);
912 timer_replica.ccu8_slice_ptr->PRS = *voltage_int_ctr.
output;
924 voltage_int_ctr.
error[2] = voltage_int_ctr.
error[1];
925 voltage_int_ctr.
error[1] = voltage_int_ctr.
error[0];
943 __attribute__((section(
".ram_code")))
957 CCU80_CC83->CR1S = 0;
958 CCU80->GCSS |= CCU8_GCSS_S3SE_Msk;
1006 #ifndef DOXYGEN_SKIP
1007 __attribute__((section(
".ram_code")))
1013 if (XMC_USIC_CH_TXFIFO_GetLevel(UART_XMC13.channel) > 4)
1020 UART_XMC13.channel->IN[0U] = (0x8000 | 0x1000 |
fault_reg);
1021 UART_XMC13.channel->IN[0U] = (((uint16_t)(LLC.
qIout) << 3));
1047 __attribute__((section(
".ram_code")))
1101 __attribute__((section(
".ram_code")))
1110 llc_pwm.ccu8_slice_ptr->CR1S = 28;
1111 llc_pwm.ccu8_slice_ptr->CR2S =
ADC_START;
1112 llc_pwm.ccu8_module_ptr->GCSS |= llc_pwm.shadow_txfr_msk;
1120 llc_pwm.ccu8_slice_ptr->CR1S = 40;
1121 llc_pwm.ccu8_slice_ptr->CR2S =
ADC_START;
1122 llc_pwm.ccu8_module_ptr->GCSS |= llc_pwm.shadow_txfr_msk;
1129 llc_pwm.ccu8_slice_ptr->CR2S =
START_FREQ >> 2;
1130 llc_pwm.ccu8_module_ptr->GCSS |= llc_pwm.shadow_txfr_msk;
1133 NVIC_DisableIRQ(start_sequence.node);
1136 NVIC_ClearPendingIRQ(HRPWM_3_IRQn);
1137 NVIC_EnableIRQ(HRPWM_3_IRQn);
1150 __attribute__((section(
".ram_code")))
1161 XMC_CCU8_SLICE_StopTimer(llc_pwm.ccu8_slice_ptr);