halt in chSysGetStatusAndLockX() Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
tsichevski
Posts: 35
Joined: Fri Feb 09, 2018 12:44 am
Has thanked: 2 times
Been thanked: 5 times

halt in chSysGetStatusAndLockX()  Topic is solved

Postby tsichevski » Fri Oct 26, 2018 2:49 pm

Hi all,

ChibiOS_17.6.3
This function was called from a thread, but the stack trace shows the chSysLockFromISR() was called:

Code: Select all

syssts_t chSysGetStatusAndLockX(void) {

  syssts_t sts = port_get_irq_status();
  if (port_irq_enabled(sts)) {
    if (port_is_isr_context()) {
      chSysLockFromISR();
    }
    else {
      chSysLock();
    }
  }
  return sts;
}


The stack trace:

Code: Select all

Thread #18 268439824 (Name: control_loop, State: CURRENT) (Suspended : Signal : SIGINT:Interrupt)   
   chSysHalt() at chsys.c:206 0x8026c64   
   _dbg_check_lock_from_isr() at chdebug.c:179 0x80251f6   
   chSysLockFromISR() at chsys.h:418 0x8026ac8   
   chSysGetStatusAndLockX() at chsys.c:371 0x8026ca2   
   osalSysGetStatusAndLockX() at osal.h:544 0x802a3f0   
   rtc_lld_get_time() at hal_rtc_lld.c:376 0x802a8e6   
   rtcGetTime() at hal_rtc.c:129 0x802a3dc   
        ...
   _port_thread_start() at chcoreasm_v7m.S:119 0x80003ae   


How can I fix this?

Regards,
Vladimir

User avatar
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:

Re: halt in chSysGetStatusAndLockX()

Postby Giovanni » Fri Oct 26, 2018 3:21 pm

Moving in bug reports, it could be a port bug.

Giovanni

User avatar
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:

Re: halt in chSysGetStatusAndLockX()

Postby Giovanni » Thu Nov 15, 2018 10:51 am

Hi,

I tested in latest 17.x and trunk but I am unable to reproduce the problem.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 65 guests