The sequence is like this
Code: Select all
chThdCreateStatic
chSysLock();
Creates new thread
Switches to new thread
chThdSleepMilliseconds
chSysLock(); > Panic as dbg_lock_cnt is already 1Is this a limitation for the MSP430 or is there an issue.
I found if i put a dbg_check_unlock(); at the begining of every thread, before the while loop, it overcomes the issue but it does not appear to be a good solution. It should be a part of thread creation if required. I couldn't see the eatra unlock on other ports.
Regards
saraben