[riot-notifications] [RIOT-OS/RIOT] [WIP] sam0_common: Add USB peripheral driver (#10915)

Koen Zandberg notifications at github.com
Sun Feb 10 12:29:58 CET 2019


bergzand commented on this pull request.



> +    while (USB->DEVICE.CTRLA.bit.SWRST) {}
+
+    /* Enable USB device */
+    USB->DEVICE.DESCADD.reg = (uint32_t)banks;
+    USB->DEVICE.CTRLA.reg |= USB_CTRLA_ENABLE | USB_CTRLA_RUNSTDBY;
+    while (usb_enable_syncing()) {}
+    /* Callibration values */
+    USB->DEVICE.PADCAL.reg =
+        USB_PADCAL_TRANSP((*(uint32_t *)USB_FUSES_TRANSP_ADDR >>
+                           USB_FUSES_TRANSP_Pos)) |
+        USB_PADCAL_TRANSN((*(uint32_t *)USB_FUSES_TRANSN_ADDR >>
+                           USB_FUSES_TRANSN_Pos)) |
+        USB_PADCAL_TRIM((*(uint32_t *)USB_FUSES_TRIM_ADDR >>
+                         USB_FUSES_TRIM_Pos));
+
+    USB->DEVICE.CTRLB.bit.SPDCONF = 0x0;

Ack

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10915#discussion_r255333572
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190210/35979273/attachment.html>


More information about the notifications mailing list