Question
simple time scheduling-systick-stm32f407
Posted on September 04, 2014 at 11:34
hi every body.
i have a 6 or 7 sensors which all of them are connected my stm32f407 through ADC,Usart and i2c(kind of sensor fusion)i want to show the data of these sensors in pc through usart.i did this , but i just get the data of sensors from adc and ... (in while loop) and after that send it from usart.ok , some of my sensors have more priority of others , i mean for example accelerometer , i need the data of it in 50 hz but for the barometer in decreases to 10 hz.i can use systick to have a accurate delay so let's consider i config systick to tick every 1 ms(SysTick_Config
(
SystemCoreClock
/
1000
)
)now question is : for doing it , do i have to know the accurate time for1- getting data from sensor 2- calculation that is implemented on sensor data3- usart that want to send data and then set the suitable delays between them to for example get accelerometer data in 10hzor my procedure is wrong ??