Added Comments

This commit is contained in:
7marcus9 2026-10-04 21:03:22 +02:00 • committed by marcus
parent b3bc6f3f26
commit 5e31e852b6

View file

@ -205,15 +205,15 @@ int main(void) {
TIM3->CCR1 = 10;
TIM3->CCR2 = 10;
TIM3->CCMR1 = 0x6868;
TIM3->CCER = 0x1111;
TIM3->EGR |= TIM_EGR_UG;
TIM3->BDTR |= TIM_BDTR_MOE;
TIM3->CR1 |= TIM_CR1_CEN;
TIM3->CCMR1 = 0x6868; // 0x68 = Mode b110 (PWM mode 1), Preload Enable, Output
TIM3->CCER = 0x1111; // Enable Caputre/Compare CH4-1
TIM3->EGR |= TIM_EGR_UG; // Reinit Timer
TIM3->BDTR |= TIM_BDTR_MOE; // Enable Main Output
TIM3->CR1 |= TIM_CR1_CEN; // Enable Counter
HAL_GPIO_WritePin(SIGNAL_LED_GPIO_Port, SIGNAL_LED_Pin, GPIO_PIN_RESET);
uint16_t frame = 0b1001000000000000;
uint16_t frame = 0b1001000000000000; // DAC128S085: Enable Write Through mode (Instant output change on write)
HAL_SPI_Transmit(&hspi1, (uint8_t * ) & frame, 1, 100);
for (int i = 0; i < 6; ++i) {