issue around MS2ST Macros
Posted: Wed Jul 20, 2016 12:38 pm
using STM32F101
got system tick set to 50,000(need the resolution in the threads). F101 system tick can only run on 16bit timer.
MS2ST(5000) as per below results in overflowing the systime_t delay varible as this is only unsigned 16bits.
So i assume this is a limitation when the system tick is high these macros dont/can't do what you want........
maybe having some check code around to warn at compile time would be useful.
got system tick set to 50,000(need the resolution in the threads). F101 system tick can only run on 16bit timer.
MS2ST(5000) as per below results in overflowing the systime_t delay varible as this is only unsigned 16bits.
Code: Select all
chVTSetI(&tmr1, MS2ST(5000), test1, &msg);
So i assume this is a limitation when the system tick is high these macros dont/can't do what you want........
maybe having some check code around to warn at compile time would be useful.