Hi! I modified the following program to get a pulse of 5V and 40kHz of frequency. I tried it in an oscilloscope and I get a 4V pulse and 12,8kHz frequency. What is wrong in the code??
STM32f407 board 5V pulse with 40kHz frequency
Code:
#include "stm32f4xx.h" #include "stm32f4xx_rcc.h" #include "stm32f4xx_gpio.h" #include "stm32f4xx_tim.h" void TM_LEDS_Init(void) { GPIO_InitTypeDef GPIO_InitStruct; /* Clock for GPIOA */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); */ /* Alternating functions for pins */...