I'm i right to assume
#define STM32_ST_USE_TIMER 2
means the OS will use GPT2 for the OS tick ? and thus this cannot be used by the user application ?
Which Timer
Moderator: RoccoMarco
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Has thanked: 83 times
- Been thanked: 67 times
Re: Which Timer
Yes you are right. It could be change with TIM 5 which is another 32-bit timer. Or you can reduce the timer resolution to 16 in chconf.h (not suggested)
Code: Select all
/**
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
#define CH_CFG_ST_RESOLUTION 16- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Which Timer
Correct but it does not use the GPT driver, there is a special ST (SysTick) driver that supports variable intervals.
Giovanni
Giovanni
Re: Which Timer
Hi,
when the ST driver uses (for example) STMs SysTick Timer, why do i have to define
?
There is just one Systick Timer
Thanks
when the ST driver uses (for example) STMs SysTick Timer, why do i have to define
Code: Select all
#define STM32_ST_USE_TIMER 2
?
There is just one Systick Timer
Thanks
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Which Timer
Hi,
The ST driver can use both the SysTick and the TIM timers, SysTick is used in ticked mode regardless that setting, TIMs are used in tickless mode and you can select which one to use.
Giovanni
The ST driver can use both the SysTick and the TIM timers, SysTick is used in ticked mode regardless that setting, TIMs are used in tickless mode and you can select which one to use.
Giovanni
Re: Which Timer
Ticked mode is if
and tickless if
?
Code: Select all
OSAL_ST_MODE == OSAL_ST_MODE_PERIODIC
and tickless if
Code: Select all
OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING
?
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times