hi again,
i'm using chnWriteTimeout with all debug enabled, and problem is when it time-out it goes into kernel-panic as debug error.
I want to ignore this, as i'm using to write over USB-cdc only when it is connected, and someone can connect-disconnect the USB when it like (basically, i'm sending a stream of data as debug, and user can connet and look at that).
Obviusly if user disconnect at the right time, when theprint is going on, that timeout occurs, and subsequential kernel panic. Is tehrea way to tell chibios to consider that timeout as "normal flow" and not debug error?
chnWriteTimeout and debug
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: chnWriteTimeout and debug
Hi,
A timeout should not result in a panic, there is something else going on there.
What panic message are you getting? (inspect dbg_panic_msg)
Giovanni
A timeout should not result in a panic, there is something else going on there.
What panic message are you getting? (inspect dbg_panic_msg)
Giovanni
Re: chnWriteTimeout and debug
msg = 0x8006b84 "\"chOQWriteTimeout\"()"
my call is chnWriteTimeout(&SDU1, data, size, timeout);
where data is "G:", size is 3, timeout is MS2ST(4) ot TIME_IMMEDIATE
chibi 2.6.x from git repo
my call is chnWriteTimeout(&SDU1, data, size, timeout);
where data is "G:", size is 3, timeout is MS2ST(4) ot TIME_IMMEDIATE
chibi 2.6.x from git repo
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: chnWriteTimeout and debug
The message does not look complete. Step into the function and see where it stops.
Giovanni
Giovanni
Re: chnWriteTimeout and debug
ifcame from "chDbgCheck(n > 0, "chOQWriteTimeout");" ofchqueues.c, seem like it does not like if i try to write an empty buffer 
about the incomplete message i don't know what to expect, this is what eclipse + gdb + openocd say
about the incomplete message i don't know what to expect, this is what eclipse + gdb + openocd say
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: chnWriteTimeout and debug
See, the answer is right there 
Panics should never be ignored.
Giovanni
Panics should never be ignored.
Giovanni
Re: chnWriteTimeout and debug
thank you, you are helping me very much to understand chibios (and MCU).
it was a little strange that a timeout was causing a panic
it was a little strange that a timeout was causing a panic