Hi,
I'm in the process to port one of my projects from ChibiOS 16.x to 18.x. I've enabled the debugging runtime-checks to hunt down possible bugs in my code base. Unfortunatly, whenever a thread sleeps it triggers SV#8 in the systick timer ISR.
Changing the timer or its IRQ priority doesn't help. And neither does reducing the code to the bare minimum (no devices active except PAL, no compiler optimizations, only main thread running, etc..). The clock settings seem to be correct too (TIMCLK[1,2] = 24 Mhz, CH_CFG_ST_FREQUENCY=5000).
Has someone any idea what I'm missing?
best regards,
greb
*edit: I forgot to mention that I run ChibiOS in tickless mode
STM32F1x: SV#8 error in systick ISR Topic is solved
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: STM32F1x: SV#8 error in systick ISR
Hi,
Make a check on IRQ priorities, priorities from 0 to 2 are reserved and cannot call kernel functions.
Giovanni
Make a check on IRQ priorities, priorities from 0 to 2 are reserved and cannot call kernel functions.
Giovanni
Re: STM32F1x: SV#8 error in systick ISR
Hi,
Thanks for the reply. According to the mcuconfig.h the IRQ priorities seem to look fine (e.g. STM32_ST_IRQ_PRIORITY=8).
I looked into the HAL ST code of ChibiOS and I didn't find any major changes between 16.x and 18.x. I'm somewhat perplexed. The HW runs 16.x without a problem.
best regards,
greb
Thanks for the reply. According to the mcuconfig.h the IRQ priorities seem to look fine (e.g. STM32_ST_IRQ_PRIORITY=8).
I looked into the HAL ST code of ChibiOS and I didn't find any major changes between 16.x and 18.x. I'm somewhat perplexed. The HW runs 16.x without a problem.
best regards,
greb
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: STM32F1x: SV#8 error in systick ISR
Hi,
Not enough info, verify that all configuration files and makefiles come from 18.2.x. You may also try to port your code (gradually) on a template application taken from 18.2.
Giovanni
Not enough info, verify that all configuration files and makefiles come from 18.2.x. You may also try to port your code (gradually) on a template application taken from 18.2.
Giovanni
Re: STM32F1x: SV#8 error in systick ISR Topic is solved
Hi,
I found out where the problem was, but not exactly why. By reducing the CH_CFG_INTERVALS_SIZE from 32 to 16 bit the problem disappered. The reason why I did it was to circumvent a failing debug-assert in chTimeAddX when the interval was set to TIME_INFINITE. This solved not only my other problem, but also the SV#8 systick issue.
best regards,
greb
I found out where the problem was, but not exactly why. By reducing the CH_CFG_INTERVALS_SIZE from 32 to 16 bit the problem disappered. The reason why I did it was to circumvent a failing debug-assert in chTimeAddX when the interval was set to TIME_INFINITE. This solved not only my other problem, but also the SV#8 systick issue.
best regards,
greb
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: STM32F1x: SV#8 error in systick ISR
Hi,
Is you system time set to 16 or 32 bits? it does not explain the SV#8 anyway, strange.
Giovanni
Is you system time set to 16 or 32 bits? it does not explain the SV#8 anyway, strange.
Giovanni
Re: STM32F1x: SV#8 error in systick ISR
Hi,
I'm using 16bit system time, because the chip only has 16bit timers.
It is my intuition that when the system time type and the interval type are different there are some strange corner cases which might fail (int overflow maybe?). But I have no hard evidence yet.
best regards,
greb
I'm using 16bit system time, because the chip only has 16bit timers.
It is my intuition that when the system time type and the interval type are different there are some strange corner cases which might fail (int overflow maybe?). But I have no hard evidence yet.
best regards,
greb
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: STM32F1x: SV#8 error in systick ISR
16 bits timers should work with 32 intervals, this is the whole point of the change. Let me know if you find something.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 26 guests