The checks as to whether a particular timer is used for system tick are in hal_st_lld.c. So the appropriate '#define STM32_TIMxx_IS_USED' is executed only when compiling that file; the information is not available to other source files which may try and use the same timer.
Not sure of the ramifications, but I suggest these checks should be somewhere more 'global', probably hal_st_lld.h, so that the error is picked up as intended.
(It's not the end of the world, since the duplicate use of the interrupt vector is picked up at link-time, as long as the interrupt is used).
Timer usage checks in wrong place Topic is solved
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
- russian
- Posts: 364
- Joined: Mon Oct 29, 2012 3:17 am
- Location: Jersey City, USA
- Has thanked: 16 times
- Been thanked: 14 times
Re: Timer usage checks in wrong place
My project seems to be affected by this fix, need help understanding what's going on.
Is ChibiOS using TIMx in any mode or only in tickless mode? My rusefi has the following settings:
# If this value is zero then the system uses the classic periodic tick.
#define CH_CFG_ST_TIMEDELTA 0
also
#define STM32_ST_USE_TIMER 2
and
#define STM32_ICU_USE_TIM2 TRUE
My code seemed to working fine. I am trying to migrate to latest Chibi17 prior to starting Chibi18 migration and now I have
#error "ST requires TIM2 but the timer is already used"
What values should I be using for classic periodic tick in order to compile with latest Chibi17? Would Chibi18 behave the same?
rusEfi tracker https://github.com/rusefi/rusefi/issues/685
PS: is this also reported at viewtopic.php?f=35&t=4976 ?
Is ChibiOS using TIMx in any mode or only in tickless mode? My rusefi has the following settings:
# If this value is zero then the system uses the classic periodic tick.
#define CH_CFG_ST_TIMEDELTA 0
also
#define STM32_ST_USE_TIMER 2
and
#define STM32_ICU_USE_TIM2 TRUE
My code seemed to working fine. I am trying to migrate to latest Chibi17 prior to starting Chibi18 migration and now I have
#error "ST requires TIM2 but the timer is already used"
What values should I be using for classic periodic tick in order to compile with latest Chibi17? Would Chibi18 behave the same?
rusEfi tracker https://github.com/rusefi/rusefi/issues/685
PS: is this also reported at viewtopic.php?f=35&t=4976 ?
http://rusefi.com/ - electronic fuel injection
Who is online
Users browsing this forum: No registered users and 18 guests