Hello,
after a variable amount of time, my program stops working (it could be a minute, an hour, 1 second)
I have 3 thread,
1) read from SPI the MEMS and it is run every 500ms
2) is on waiting a wake-up event from EXTI callback
3) perform the initialization and normal operation for a bluenrg chip through another SPI, it runs every 1ms (the fastest I made it run, the quickest the problem arises)
in the point when I write something to SPI and I need to wait data from the other chip, I've used a binary semaphore with timeout (the thread nr.2 gives a signal once the activities are done, means reading from SPI until the irq line drove by bluenrg chip is kept high).
I have a problem now, the system stop working and from openocd I got the message:
Program received signal SIGINT, Interrupt.
chSysHalt (reason=0x800d478 "SV#8") at ../../../os/rt/src/chsys.c:179
I read from the wiki that SV#8 means "The macro CH_IRQ_PROLOGUE() has not been placed at very beginning of an ISR or it has been placed within a critical zone"
Since I use a EXTI callback, I never use CH_IRQ_PROLOGUE on the callback.
Any idea how to solve this problem?
Thanks
SV#8 error on stmf429-discovery
Moderator: RoccoMarco
-
enrico.dallavia
- Posts: 105
- Joined: Thu Mar 12, 2015 10:15 am
- Has thanked: 2 times
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: SV#8 error on stmf429-discovery
It could be a problem with IRQ priorities, do you have interrupt sources external to the HAL? If so you are assigning to it an invalid priority, valid are 2..15.
Giovanni
Giovanni
-
enrico.dallavia
- Posts: 105
- Joined: Thu Mar 12, 2015 10:15 am
- Has thanked: 2 times
Re: SV#8 error on stmf429-discovery
Indeed I've changed STM32_EXT_EXTI3_IRQ_PRIORITY from 6 to 0 (since ST original code was assigning this value to the interrupt source). I'll try with value above 2.
Thank you! I would never ever spotted this one.
Thank you! I would never ever spotted this one.
-
enrico.dallavia
- Posts: 105
- Joined: Thu Mar 12, 2015 10:15 am
- Has thanked: 2 times
Re: SV#8 error on stmf429-discovery
After I've changed the value of irq from 0 to 2 it seems to work flawlessly!
Thanks!
Thanks!