unexpected chSysHalt of ch version 18.2.0

Discussions and support about ChibiOS/RT, the free embedded RTOS.
Post Reply
askariz
Posts: 1
Joined: Fri Mar 03, 2023 4:06 am

unexpected chSysHalt of ch version 18.2.0

Post by askariz »

I have come across an unexpected chSysHalt which call stack is
chSysHalt@0x08011b56 (\home\askariz\mmc_gnss\zubax_chibios\chibios\os\rt\src\chsys.c:181)
chEvtSignalI@0x08012b06 (\home\askariz\mmc_gnss\zubax_chibios\chibios\os\rt\src\chevents.c:285)
timer_callback@0x0801fdfa (\home\askariz\mmc_gnss\firmware\src\board\board.cpp:76)
gpt_lld_serve_interrupt@0x08014c88 (\home\askariz\mmc_gnss\zubax_chibios\chibios\os\hal\ports\STM32\LLD\TIMv1\gpt_lld.c:887)
VectorB0@0x08014cb0 (\home\askariz\mmc_gnss\zubax_chibios\chibios\os\hal\ports\STM32\LLD\TIMv1\gpt_lld.c:180)
<signal handler called>@0xffffffed (Unknown Source:0)
__WFI@0x08011a82 (\home\askariz\mmc_gnss\zubax_chibios\chibios\os\ext\CMSIS\include\core_cmInstr.h:434)
port_wait_for_interrupt@0x08011a82 (\home\askariz\mmc_gnss\zubax_chibios\chibios\os\rt\ports\ARMCMx\chcore_v7m.h:559)
_idle_thread@0x08011a82 (\home\askariz\mmc_gnss\zubax_chibios\chibios\os\rt\src\chsys.c:72)
_port_thread_start@0x0801037a (Unknown Source:0)


and you can see the code in timer_callback
static void timer_callback(GPTDriver *gptp)
{
(void)gptp;
signal_count_10ms ++;
chSysLockFromISR();
if((signal_count_10ms % 10) == 0)
{
if( extWait_RM3100_Thread != NULL )
{
chEvtSignalI(extWait_RM3100_Thread, board::EVT_MASK_TIMER_10MS);
}

if(extWait_IST8310_Thread != NULL )
{
chEvtSignalI(extWait_IST8310_Thread, board::EVT_MASK_TIMER_10MS);
}
}



my platform is stm32f412ce . any help would be appreciate.
chSysUnlockFromISR();
}

my question is how can be trigger the input args tp is NULL .. cause i have protect when call it .. is so wired.
void chEvtSignalI(thread_t *tp, eventmask_t events) {

chDbgCheckClassI();
chDbgCheck(tp != NULL);
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: unexpected chSysHalt of ch version 18.2.0

Post by Giovanni »

Hi,

You should investigate why tp is NULL, the cause is probably non-obvious, a stack overflow for example.

Said that, 18.x is long unsupported, consider moving to a recent version.

Giovanni
Post Reply