Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4587fc5

Browse filesBrowse files
authored
Merge pull request #509 from sameer/master
Set USB SRAM QoS to sensitive latency
2 parents 703b87e + d96b9b3 commit 4587fc5
Copy full SHA for 4587fc5

File tree

2 files changed

+6
-0
lines changed
Filter options

2 files changed

+6
-0
lines changed

‎cores/arduino/USB/SAMD21_USBDevice.h

Copy file name to clipboardExpand all lines: cores/arduino/USB/SAMD21_USBDevice.h
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class USBDevice_SAMD21G18x {
5050
inline void noRunInStandby() { usb.CTRLA.bit.RUNSTDBY = 0; }
5151
inline void wakeupHost() { usb.CTRLB.bit.UPRSM = 1; }
5252

53+
// USB QoS
54+
inline void setDataSensitiveQoS() { usb.QOSCTRL.bit.DQOS = 2; }
55+
inline void setConfigSensitiveQoS() { usb.QOSCTRL.bit.CQOS = 2; }
56+
5357
// USB speed
5458
inline void setFullSpeed() { usb.CTRLB.bit.SPDCONF = USB_DEVICE_CTRLB_SPDCONF_FS_Val; }
5559
inline void setLowSpeed() { usb.CTRLB.bit.SPDCONF = USB_DEVICE_CTRLB_SPDCONF_LS_Val; }

‎cores/arduino/USB/USBCore.cpp

Copy file name to clipboardExpand all lines: cores/arduino/USB/USBCore.cpp
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ void USBDeviceClass::init()
295295
usbd.reset();
296296

297297
usbd.calibrate();
298+
usbd.setDataSensitiveQoS();
299+
usbd.setConfigSensitiveQoS();
298300
usbd.setUSBDeviceMode();
299301
usbd.runInStandby();
300302
usbd.setFullSpeed();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.