arduino / arduino/ArduinoCore-sam

Cannot use isochronous endpoint with PluggableUSB.

Open
#58 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
91
Forks
112
PR merge metrics
No merged PRs in 30d

Description

When I defined an endpoint to be `EP_TYPE_ISOCHRONOUS_IN` in the **PluggableUSBModule** constructor, I noticed that the program will crash in function `USB_ISR` when calls function `UDD_InitEndpoints` at line [784](https://github.com/arduino/ArduinoCore-sam/blob/3394937e5df00636abc5823446ecba5aa6940e42/cores/arduino/USB/USBCore.cpp#L776). However, in the definition of [EP_TYPE_ISOCHRONOUS_IN](https://github.com/arduino/ArduinoCore-sam/blob/3394937e5df00636abc5823446ecba5aa6940e42/system/libsam/include/uotghs_device.h#L86) if I change **UOTGHS_DEVEPTCFG_EPSIZE_1024_BYTE** to **UOTGHS_DEVEPTCFG_EPSIZE_512_BYTE** then the program runs fine. I could not figure out why.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in cores/arduino/USB/USBCore.cpp at USB_ISR and the call to UDD_InitEndpoints around line 784. Compare the EP_TYPE_ISOCHRONOUS_IN definition in system/libsam/include/uotghs_device.h, then reproduce the crash with a PluggableUSBModule endpoint using the 1024-byte setting. Done means the isochronous endpoint initializes and the program no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.