Add 'Default/standard mode'

Triss 2021-07-30 17:02:29 +00:00
parent d0c01016b2
commit 8c937dffaf
1 changed files with 59 additions and 0 deletions

@ -0,0 +1,59 @@
The default/standard mode, mode 1, exposes various interfaces.
## Pinout
### Raspberry Pico
| Pin number | Usage | Usage | Pin number |
|:---------- |:-------------- | --------------:| ----------:|
| GP0 | stdio UART TX | | VBUS |
| GP1 | stdio UART RX | | VSYS |
| GND | <ground> | <ground> | GND |
| GP2 | SWCLK/TCK | | 3V3 EN |
| GP3 | SWDIO/TMS | | 3V3 OUT |
| GP4 | TDI | | ADC VREF |
| GP5 | TDO | | GP28 / ADC2|
| GND | <ground> | <ground> | GND / AGND|
| GP6 | nTRST | | GP27 / ADC1|
| GP7 | nRESET | | GP26 / ADC0|
| GP8 | UART TX | | RUN |
| GP9 | UART RX | (1-wire, TODO) | GP22 |
| GND | <ground> | <ground> | GND |
| GP10 | UART CTS | SCL | GP21 |
| GP11 | UART RTS | SDA | GP20 |
| GP12 | MISO | | GP19 |
| GP13 | nCS | | GP18 |
| GND | <ground> | <ground> | GND |
| GP14 | SCLK | | GP17 |
| GP15 | MOSI | | GP16 |
| <end>| <bottom> | <bottom> | <end>|
## Functions
### UART
The UART interface allows one to interact with another device over a UART port, using a USB-CDC device (`/dev/ttyACMx`). Baudrate and other line coding settings are applied from the settings from the USB-CDC host, and thus require no special configuration tool.
It is possible to enable hardware flow control (using `CTS` and `RTS` lines), it can be enabled or disabled using `dmctl uart-cts-rts [--get|--set]`.
### JTAG and SWD
The device exposes CMSIS-DAP functionality over a USB HID interface, which can be used for JTAG or SWD debugging. No special configuration is required to use it.
### SPI
The SPI interface can be used in two ways: using a serprog USB-CDC interface, mostly useful for interacting with SPI flash chips, and a kernel module, for generic SPI operations, though the Linux `spidev` interface.
### I2C
I2C is exposed only through a Linux kernel module, which can then be used by standard Linux I2C tools (such as utilities from the `i2c-tools` package, eg. `i2cget`, `i2cset`, `i2cdetect`). The `i2c-dev` module needs to be loaded for this to work.
### Temperature sensor
A temperature sensor is available and used as a Linux hwmon kernel module, making the output available for use in `lm_sensors` output.
Additionally, it can also be configured to appear on the device's I2C bus as an emulated I2C device, pretending to be a JC42-compliant temperature sensor. This can be achieved using `dmctl tempsensor --set <addr>`.
### 1-wire
This part is still TODO