I'm trying to get the USB CDC working on the Olimexino board. I'm not using any Maple bootloader stuff, the board is hooked up to a j-link lite.
I can get the USB interface started, and Windows registers the virtual COM port including the ChibiOS name. So I think this indicates that there is communication both ways.
I've set a breakpoint on the sduDataReceived, and the debugger breaks correctly when entering characters on the windows terminal connected to the virtual COM port.
Trying to write to the USB serial device stalls the OS inside the chOQWriteTimeout on this line:
if (qwait((GenericQueue *)oqp, time) != Q_OK) {
I'm using the latest ChibiStudio 2.6.3, and made a customized board.h for Olimexino.
Any suggestions in how to fix this?
USB CDC on Olimexino STM32 (Maple)
Moderator: RoccoMarco
-
Kenneth E.
- Posts: 6
- Joined: Mon Oct 10, 2011 8:59 pm
USB CDC on Olimexino STM32 (Maple)
- Attachments
-
- usbcdc.zip
- Configuration files
- (12.38 KiB) Downloaded 412 times
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: USB CDC on Olimexino STM32 (Maple)
Hi,
It is probably a stack overflow or a similar problem, try enabling the debug options in chconf.h and see if something is caught.
Giovanni
It is probably a stack overflow or a similar problem, try enabling the debug options in chconf.h and see if something is caught.
Giovanni
-
Kenneth E.
- Posts: 6
- Joined: Mon Oct 10, 2011 8:59 pm
Re: USB CDC on Olimexino STM32 (Maple)
Great - I've enabled debugging, hopefully this will also allow me to figure out the instabilities I get from time to time.
What is port_halt(). I sometimes get this upon initialization?
7 port_halt() chcore.c:50 0x08000212
6 chDbgPanic() chdebug.c:274 0x08000996
5 chSchGoSleepS() chschd.c:128 0x08000cc2
4 chSchGoSleepTimeoutS() chschd.c:197 0x08000dbe
3 chThdSleep() chthreads.c:297 0x0800131e
2 InitializeUSB() usb_cdc.c:341 0x0801367a
1 main() main.c:473 0x080140e6
What is port_halt(). I sometimes get this upon initialization?
7 port_halt() chcore.c:50 0x08000212
6 chDbgPanic() chdebug.c:274 0x08000996
5 chSchGoSleepS() chschd.c:128 0x08000cc2
4 chSchGoSleepTimeoutS() chschd.c:197 0x08000dbe
3 chThdSleep() chthreads.c:297 0x0800131e
2 InitializeUSB() usb_cdc.c:341 0x0801367a
1 main() main.c:473 0x080140e6
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: USB CDC on Olimexino STM32 (Maple)
port_halt() is what is called when an error is defected, inspect dbg_panic_msg for an error message. Probably that is "stack overflow".
Giovanni
Giovanni
-
Kenneth E.
- Posts: 6
- Joined: Mon Oct 10, 2011 8:59 pm