Gast
#5197647
Hi, I am relatively new to STM32 but already did a project with STMs Timers DMA... About the project: this STM32F103C8 chould handle 3 UART (not USART) ports with communication on 20Hz basis. Furthermore control a gear motor with a relay for direction and FET and PWM for speed. A PID should control the speed based on velocity from encoder. To compute the speed I want to get and 40Hz interrupt from Timer1 as all the other timers are busy. So as the clock is 72Mhz I set prescalar to 1800 and period to 1000. But when I look at the Interrupt calls with my Ozi, i get a much lower speed about 0,26 Hz. So I searched the net how this could be and eventually encovered, that there might be interference with UART1. So the odd part comes now: When I out comment the UART1 initialization (USART_Cmd) the frequency doubles to about 0,5Hz After adding comments to USART_DMACmd the frequency jumps to 0,18Hz... After 3 hours of searching and debugging I don't know what to do. Can anybody tell me what I am doing wrong here? Thanks in advance Noah Source code (PID not finished yet)