You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This driver adds support for Microchip PIC microcontrollers with full-speed Chipidea USB peripheral to the TinyUSB stack. It supports the following families:
4
+
5
+
- PIC32MX (untested)
6
+
- PIC32MM
7
+
- PIC32MK (untested)
8
+
- PIC24FJ
9
+
- PIC24EP (untested)
10
+
- dsPIC33EP (untested)
11
+
12
+
Currently only the device mode is supported.
13
+
14
+
15
+
## Important Notes
16
+
17
+
### Handling of shared VBUS & GPIO pin
18
+
19
+
Some PICs have the USB VBUS pin bonded with a GPIO pin in the chip package. This driver does **NOT** handle the potential conflict between the VBUS and GPIO functionalities.
20
+
21
+
Developers must ensure that the GPIO pin is tristated when the VBUS pin is managed by the USB peripheral in order to prevent damaging the chip.
22
+
23
+
This design choice allows developers the flexibility to use the GPIO functionality for controlling VBUS in device mode if desired.
24
+
25
+
26
+
## TODO
27
+
28
+
### Handle USB remote wakeup timing correctly
29
+
30
+
The Chipidea FS IP doesn't handle the RESUME signal automatically and it must be managed in software. It needs to be asserted for exactly 10ms, and this is impossible to do without per-device support due to BSP differences. For now, a simple for-based loop is used.
31
+
32
+
### 8-bit PIC support
33
+
34
+
The 8-bit PICs also uses the Chipidea FS IP. Technically it's possible to support them as well.
35
+
36
+
Possible difficulties:
37
+
- Memory size constraints (1KB/8KB ballpark)
38
+
- A third BDT layout (now we have two)
39
+
- Different compiler-specific directives
40
+
- Compiler bugs if you use SDCC
41
+
42
+
43
+
## Author
44
+
[ReimuNotMoe](https://github.com/ReimuNotMoe) at SudoMaker, Ltd.
0 commit comments