diff options
| author | William D. Jones <[email protected]> | 2019-10-02 23:18:49 -0400 |
|---|---|---|
| committer | William D. Jones <[email protected]> | 2019-10-02 23:18:49 -0400 |
| commit | 5ee1070c16363702dc0693ba31e1e0dab4cd4235 (patch) | |
| tree | 8d1bcc82afcfacc09960cae71043670b656318bb /docs | |
| parent | b0b737b42a14982a1f928e408ba7eadc3f474d04 (diff) | |
| parent | e59742f200ec4635dffb50b09d40bc05f6ac5eda (diff) | |
Merge remote-tracking branch 'origin' into msp430f5529
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/boards.md | 37 | ||||
| -rw-r--r-- | docs/concurrency.md | 36 |
2 files changed, 57 insertions, 16 deletions
diff --git a/docs/boards.md b/docs/boards.md index 48cb333b9..0b38cf568 100644 --- a/docs/boards.md +++ b/docs/boards.md @@ -9,6 +9,14 @@ The board support code is only used for self-contained examples and testing. It This code base already had supported for a handful of following boards +### MicroChip SAMD + +- [Adafruit Circuit Playground Express](https://www.adafruit.com/product/3333) +- [Adafruit Feather M0 Express](https://www.adafruit.com/product/3403) +- [Adafruit Metro M0 Express](https://www.adafruit.com/product/3505) +- [Adafruit Feather M4 Express](https://www.adafruit.com/product/3857) +- [Adafruit Metro M4 Express](https://www.adafruit.com/product/3382) + ### Nordic nRF5x - [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062) @@ -31,24 +39,21 @@ This code base already had supported for a handful of following boards - [LPCXpresso 54114](https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso54114-board:OM13089) - [LPCXpresso 55s69 EVK](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc5500-cortex-m33/lpcxpresso55s69-development-board:LPC55S69-EVK) -### MicroChip SAMD - -- [Adafruit Circuit Playground Express](https://www.adafruit.com/product/3333) -- [Adafruit Feather M0 Express](https://www.adafruit.com/product/3403) -- [Adafruit Metro M0 Express](https://www.adafruit.com/product/3505) -- [Adafruit Feather M4 Express](https://www.adafruit.com/product/3857) -- [Adafruit Metro M4 Express](https://www.adafruit.com/product/3382) - ### ST STM32 -- [STM32F070rb Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f070rb.html) -- [STM32F072rb Discovery](https://www.st.com/en/evaluation-tools/32f072bdiscovery.html) -- [STM32F303vc Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html) -- [STM32F407vg Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html) -- [STM32F411ve Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html) -- [STM32F412zg Discovery](https://www.st.com/en/evaluation-tools/32f412gdiscovery.html) -- [Nucleo STM32F767zi](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html) -- [Nucleo H743zi](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html) +- Adafruit Feather STM32F405 +- [Micro Python PyBoard v1.1](https://store.micropython.org/product/PYBv1.1) +- [STM32 L035c8 Discovery](https://www.st.com/en/evaluation-tools/32l0538discovery.html) +- [STM32 F070rb Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f070rb.html) +- [STM32 F072rb Discovery](https://www.st.com/en/evaluation-tools/32f072bdiscovery.html) +- STM32 F103c Blue Pill +- [STM32 F207zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f207zg.html) +- [STM32 F303vc Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html) +- [STM32 F407vg Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html) +- [STM32 F411ve Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html) +- [STM32 F412zg Discovery](https://www.st.com/en/evaluation-tools/32f412gdiscovery.html) +- [STM32 F767zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html) +- [STM32 H743zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html) ## Add your own board diff --git a/docs/concurrency.md b/docs/concurrency.md new file mode 100644 index 000000000..e05ca6ffe --- /dev/null +++ b/docs/concurrency.md @@ -0,0 +1,36 @@ +# Concurrency + +The TinyUSB library is designed to operate on single-core MCUs with multi-threaded applications in mind. Interaction with interrupts is especially important to pay attention to. +It is compatible with optionally using a RTOS. + +## General + +When writing code, keep in mind that the OS (if using a RTOS) may swap out your code at any time. Also, your code can be preempted by an interrupt at any time. + +## Application Code + +The USB core does not execute application callbacks while in an interrupt context. Calls to application code are from within the USB core task context. Note that the application core will call class drivers from within their own task. + +## Class Drivers + +Class driver code should never be called from an interrupt context by the USB core, though the application is allowed to call class driver functions from interrupts. USB core functions may be called simultaneously by multiple tasks. Use care that proper locking is used to guard the USBD core functions from this case. + +Class drivers are allowed to call `usbd_*` functions, but not `dcd_*` functions. + +## USB Core + +All functions that may be called from an (USB core) interrupt context have a `bool in_isr` parameter to remind the implementer that special care must be taken. + +Interrupt handlers must not directly call class driver code, they must pass a message to the USB core's task. + + `usbd_*` functions may be called from interrupts without any notice. They may also be called simultaneously by multiple tasks. + +## Device Drivers + +Much of the processing of the USB stack is done in an interrupt context, and care must be taken in order to ensure variables are handled in the appropriate ways by the compiler and optimizer. + +In particular: + +- Ensure that all memory-mapped registers (including packet memory) are marked as volatile. GCC's optimizer will even combine memory access (like two 16-bit to be a 32-bit) if you don't mark the pointers as volatile. On some architectures, this can use macros like `_I`, `_O`, or `_IO'. +- All defined global variables are marked as `static`. + |
