Re: ASSERT failure in USB HID


Johannes Hutter
 

I got hands on a nucleo-f411re and actually encounter the same issue. I also observed that the callback is set for the endpoints 0x00, 0x80 and 0x81 (the last one being the configured HID endpoint), but the enable function is only called for the first two. Does anyone have an idea what the issue is there?


On 29.03.2018 20:53, Yannis Damigos wrote:
Hi Joe,

I try USB HID sample on my 96b_carbon with ASSERTs enabled and it fails with a different error.

***** USAGE FAULT *****
  Executing thread ID (thread): 0x20000938
  Faulting instruction address:  0x8001e82
  Division by zero
Fatal fault in essential thread! Spinning...

I added developers mailing list to give greater visibility to the problem.

Yannis

On 03/29/2018 05:27 PM, Johannes Hutter wrote:
Hey Yannis,

first of all, thanks for the support on the Zephyr Mailing List the last weeks. I don't want to spam the list too much, that's why I'm writing you directly. If you prefer to keep the questions on the mailing list, I am happy to do that.


Now my question: The USB HID configuration works perfectly fine (I basically simulate a keyboard). But if I enable ASSERTs my program (and also the USB HID sample) fails during boot with following log:


[general] [DBG] HAL_PCD_ResetCallback:
[usb/hid] [DBG] hid_status_cb: USB device reset detected
[general] [DBG] HAL_PCD_SetupStageCallback:
[general] [DBG] usb_handle_control_transfer: usb_handle_control_transfer ep 0, status 0
[general] [DBG] usb_dc_ep_read_wait: ep 0x00, 8 bytes, 0+8, 0x20009bb4
[general] [DBG] usb_handle_request: ** 0 **
[usb/hid] [DBG] hid_custom_handle_req: Standard request: bRequest 0x6 bmRequestType 0x80 len 64
[general] [DBG] usb_handle_std_device_req: REQ_GET_DESCRIPTOR
[general] [DBG] usb_dc_ep_write: ep 0x80, len 18
[general] [DBG] usb_dc_ep_transfer: ep 0x80, len=18, in=1, sync=no
ASSERTION FAIL [!_IsInIsr()] @ /home/joe/code/proglove/embed/mark_one_s_firmware/lib/zephyr/kernel/sched.c:328:


Would you be so kind and try to run the sample on your boards with ASSERTs enabled? Just to find out whether the problem is on my custom board side or not.

Thanks a lot and best regards,

Joe


-- 

Johannes Hutter | Embedded Software Engineer
Mail: johannes@... <mailto:johannes@...>


	

Workaround GmbH (ProGlove)
Friedenstr. 4 | 81671 München

Managing Director: Thomas Kirchner
HRB: 216605 | AG München
USt.-IdNr.: DE298859320


    

--

Johannes Hutter | Embedded Software Engineer
Mail: johannes@...


Workaround GmbH (ProGlove)
Friedenstr. 4 | 81671 München

Managing Director: Thomas Kirchner
HRB: 216605 | AG München
USt.-IdNr.: DE298859320

Join devel@lists.zephyrproject.org to automatically receive all group messages.