AnsweredAssumed Answered

simple time scheduling-systick-stm32f407

Question asked by armoun.mohamad on Sep 4, 2014
Latest reply on Sep 5, 2014 by armoun.mohamad
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 for
1- getting data from sensor 
2- calculation that is implemented on sensor data
3- usart that want to send data 

and then set the suitable delays between them to for example get accelerometer  data in 10hz
or my procedure is wrong ??

Outcomes