1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/feather-m0/doc.txt

59 lines
2.1 KiB
Plaintext

/**
@defgroup boards_feather-m0 Adafruit Feather M0
@ingroup boards
@brief Support for the Adafruit Feather M0.
### General information
Feather M0 boards are development boards shipped by
[Adafruit](https://learn.adafruit.com/adafruit-feather-m0-basic-proto/).
All the feather M0 boards are built based on the same Atmel SAMD21G18A
microcontroller. See @ref cpu_samd21.
Several types of Feather M0 boards exist:
* [Feather M0 WiFi](https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/)
* [Feather M0 BLE](https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/overview)
* [Feather M0 Adalogger](https://learn.adafruit.com/adafruit-feather-m0-adalogger/)
* [Feather M0 LoRa](https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module)
The different modules used to differentiate the boards (ATWINC1500 WiFi,
Bluefruit LE, SD card, LoRa) are connected via SPI (SPI_DEV(0)) to the
SAMD21 mcu.
### Pinout
<img src="https://cdn-learn.adafruit.com/assets/assets/000/030/921/original/adafruit_products_2772_pinout_v1_0.png"
alt="Adafruit Feather M0 proto pinout" style="width:800px;"/><br/>
`AIN7` can be used to [measure the voltage of a connected Lipoly battery][battery].
It is mapped to ADC_LINE(6) in RIOT.
~~~~~~~~~~~~~~~~ {.c}
int vbat = adc_sample(ADC_LINE(6), ADC_RES_10BIT);
vbat *= 2; /* voltage was divided by 2, so multiply it back */
vbat *= 33; /* reference voltage 3.3V * 10 */
vbat /= 10240; /* resolution * 10 (because we multiplied 3.3V by 10) */
printf("Bat: %dV\n", vbat);
~~~~~~~~~~~~~~~~
[battery]: https://learn.adafruit.com/adafruit-feather-m0-basic-proto/power-management#measuring-battery-4-9
### Flash the board
1. Put the board in bootloader mode by double tapping the reset button.<br/>
When the board is in bootloader mode, the user led (red) oscillates smoothly.
2. Use `BOARD=feather-m0` with the `make` command.<br/>
Example with `hello-world` application:
```
make BOARD=feather-m0 -C examples/hello-world flash
```
### Accessing STDIO via UART
To access the STDIO of RIOT, a FTDI to USB converted needs to be plugged to
the RX/TX pins on the board.
*/