MattairTech MT--D21E Скачать руководство пользователя страница 23

MT-D21E

User Guide

 *   There are two ways that pins can be mapped. The first is to map pins contiguously
 *   (no PIO_NOT_A_PIN entries) in the table. This results in the least amount of space
 *   used by the table. A second method, used by default by the MT-D21E and MT-D11, maps
 *   Arduino pin numbers to the actual port pin number (ie: Arduino pin 28 = Port A28).
 *   This only works when there is one port. Because not all port pins are available,
 *   PIO_NOT_A_PIN entries must be added for these pins and more FLASH space is consumed.
 *   For an example of both types, see variant.cpp from the MT-D11 variant.
 * 
 *   Explanation of PinDescription table:
 * 
 *   Port                  This is the port (ie: PORTA).
 *   Pin                   This is the pin (bit) within the port. Valid values are 0-31.
 *   PinType               This indicates what peripheral function the pin can be
 *                         attached to. In most cases, this is PIO_MULTI, which means
 *                         that the pin can be anything listed in the PinAttribute field.
 *                         It can also be set to a specific peripheral. In this case, any
 *                         attempt to configure the pin (using pinPeripheral or pinMode)
 *                         as anything else will fail (and pinPeripheral will return -1).
 *                         This can be used to prevent accidental re-configuration of a
 *                         pin that is configured for only one function (ie: USB D- and
 *                         D+ pins). If a pin is not used or does not exist,
 *                         PIO_NOT_A_PIN must be entered in this field. See WVariant.h
 *                         for valid entries. These entries are also used as a parameter
 *                         to pinPeripheral() with the exception of PIO_NOT_A_PIN and
 *                         PIO_MULTI. The pinMode function now calls pinPeripheral() with
 *                         the desired mode. Note that this field is not used to select
 *                         between the two peripherals possible with each of the SERCOM
 *                         and TIMER functions. PeripheralAttribute is now used for this.
 *   PeripheralAttribute   This is an 8-bit bitfield used for various peripheral
 *                         configuration. It is primarily used to select between the two
 *                         peripherals possible with each of the SERCOM and TIMER
 *                         functions. TIMER pins are individual, while SERCOM uses a
 *                         group of two to four pins. This group of pins can span both
 *                         peripherals. For example, pin 19 (SPI1 SCK) on the MT-D21E
 *                         uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses
 *                         PER_ATTR_SERCOM_STD. Both TIMER and SERCOM can exist for each
 *                         pin. This bitfield is also used to set the pin drive strength.
 *                         In the future, other attributes (like input buffer
 *                         configuration) may be added. See WVariant.h for valid entries.
 *   PinAttribute          This is a 32-bit bitfield used to list all of the valid
 *                         peripheral functions that a pin can attach to. This includes
 *                         GPIO functions like PIN_ATTR_OUTPUT. Certain attributes are
 *                         shorthand for a combination of other attributes.
 *                         PIN_ATTR_DIGITAL includes all of the GPIO functions, while
 *                         PIN_ATTR_TIMER includes both PIN_ATTR_TIMER_PWM and
 *                         PIN_ATTR_TIMER_CAPTURE (capture is not used yet).
 *                         PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. There is
 *                         only one DAC channel, so PIN_ATTR_DAC appears only once. This
 *                         bitfield is useful for limiting a pin to only input related
 *                         functions or output functions. This allows a pin to have a
 *                         more flexible configuration, while restricting the direction
 *                         (ie: to avoid contention). See WVariant.h for valid entries.
 *   TCChannel             This is the TC(C) channel (if any) assigned to the pin. Some
 *                         TC channels are available on multiple pins (ie: TCC0/WO[0] is
 *                         available on pin A4 or pin A8 on the MT-D21E). In general,
 *                         only one pin should be configured (in the pinDescription
 *                         table) per TC channel. See WVariant.h for valid entries.
 *                         The tone library uses TC5 (MT-D21E) or TC2 (MT-D11).
 *   ADCChannelNumber      This is the ADC channel (if any) assigned to the pin. See
 *                         WVariant.h for valid entries.

July 11, 2016

23

http://www.mattairtech.com/

Содержание MT--D21E

Страница 1: ...MT D21E User Guide July 11 2016 1 http www mattairtech com...

Страница 2: ...19 Detailed Memory Usage Output After Compilation 20 Installation 21 Driver Installation 21 SAMD Core Installation 22 New PinDescription Table 22 Possible Future Additions 24 ChangeLog 24 SAM BA USB...

Страница 3: ...MT D21E User Guide July 11 2016 3 http www mattairtech com...

Страница 4: ...ed is a mini USB connector blue LED 16MHz crystal 32 768KHz crystal and two buttons A USB CDC bootloader Atmel SAM BA can be pre installed for device programming without an external programmer It is c...

Страница 5: ...configurable for reset or general use pin A31 with debouncing Two 4 7Kohm resistors can be connected to pins A16 and A17 for use with I2C USB SAM BA CDC bootloader optional Arduino compatible use the...

Страница 6: ...compare channels with optional complementary output Generation of synchronized pulse width modulation PWM pattern across port pins Deterministic fault protection fast decay and configurable dead time...

Страница 7: ...MT D21E User Guide MT D21E Hardware MT D21E Hardware Top View Pinout July 11 2016 7 http www mattairtech com...

Страница 8: ...the board J12 will complete the circuit for a resistor divider consisting of a 200Kohm top and a 20Kohm resistor bottom and J3 connects to Vbus The resistor divider will pull pin A7 to near ground le...

Страница 9: ...nts Main Header Pins Signal Pin Description A0 A1 Xin32 Xout32 These can be used for analog or digital functions Alternatively jumpers J16 and J17 can be set to route A0 and A1 to the 32 768KHz crysta...

Страница 10: ...e used for digital functions Additionally this pin is connected to the Cortex debug header where it is used as SWD CLK A31 Button B SWD IO This can be used for digital functions Additionally the pin i...

Страница 11: ...s disconnected J4 USB D Pin A25 Microcontroller pins A24 and A25 are connected to header pins A24 and A25 By default these pins are also connected to pins D and D of the USB connector through jumpers...

Страница 12: ...so used by the Cortex debug header SWD IO The button can be completely disconnected by removing solder from all three pads J16 32 768KHz crystal selection J16 and J17 determine whether microcontroller...

Страница 13: ...otes Please read Updated ASCII pinouts to be more readable and less ambiguous Updated the Signed driver for Windows extras directory adds CDC MIDI HID CDC MSD HID and CDC MSD MIDI HID composite USB de...

Страница 14: ...KB D21E18A 16 KB D21E17A 8 KB D21E16A 4 KB D21E15A 4 KB EEPROM None emulation may be available in the future None emulation may be available in the future Digital Pins 22 17 Analog Input Pins 10 12 bi...

Страница 15: ...at includes HID ie CDC_HID_UART This menu is currently needed to select the USB PID that matches the USB device configuration needed for Windows This may become automatic in a future release Be sure t...

Страница 16: ...9 INT9 9 TCC01 9 9 ADC17 A9 A22 22 22 TC40 22 INT6 MISO TX1 10 TCC02 10 10 ADC18 A10 A19 19 19 INT3 SCK RX1 11 TCC03 11 11 ADC19 A11 A18 18 18 INT2 MOSI TX2 14 INT14 14 TC30 14 A14 A17 17 17 TCC21 17...

Страница 17: ...ns MT D11 can be configured as PWM outputs Available using the analogWrite function Each pin provides 8 bits of resolution 256 values by default 12 bit resolution supported by using the analogWriteRes...

Страница 18: ...KHz crystal is used by the Arduino core so it MUST be connected via the solder jumpers Note that the sketch may still run without the crystal attached but the clock speed will be very inaccurate The 1...

Страница 19: ...e open it to restart communication Code Size and RAM Usage 1 6 5 mt2 Sketch and Configuration MT D21E Code RAM MT D11 Code RAM Blink CDC HID UART 7564 1524 7452 1424 Blink CDC UART 6588 1496 6484 1396...

Страница 20: ...n Just above the normal flash usage message is the output from the size utility However this output is also incorrect as it shows text data in the text field but 0 in the data field However the text f...

Страница 21: ...you do not already have the test firmware installed see Using Bossac Standalone below 7 Press the reset button to run the test firmware blink sketch with CDC HID 8 Windows will detect the board Point...

Страница 22: ...1 6 6 mtX 7 Install the MattairTech SAMD Boards package 1 6 6 mtX 8 Close Boards Manager then click Tools Board MattairTech MT D21E or MT D11 9 Select the processor with the now visible Tools Processo...

Страница 23: ...ibute This is an 8 bit bitfield used for various peripheral configuration It is primarily used to select between the two peripherals possible with each of the SERCOM and TIMER functions TIMER pins are...

Страница 24: ...library Optional use of single on board LED as USB activity LED Replace pulse with timer capture MSC Mass Storage USB Device Class Polyphonic tone Better OS X support Libraries for some hardware I pla...

Страница 25: ...will require re selecting the COM port More detailed memory usage at end of compilation see below Merged in upstream updates Fixed Wire interrupt Tested all ADC DAC external interrupts PWM outputs ser...

Страница 26: ...om web products bossa It adds support for more SAMD chips both D21 and D11 Note that only the Arduino or Mattairtech versions of bossac are currently supported for SAMD chips Neither the stock bossac...

Страница 27: ...n Bootloader Ignore any messages about not supporting shutdown or reset 6 Continue with driver installation above Bootloader Installation Using Another Tool ie Atmel Studio openocd 1 Download the boot...

Страница 28: ...irtech 1 x86_64 linux gnu tar bz2 Linux 64 bit https www mattairtech com software arduino bossac 1 5 arduino mattairtech 1 i686 linux gnu tar bz2 Linux 32 bit Use the bossac command from the Arduino S...

Страница 29: ...er by pressing button A while powering up the board from USB Or hold button A while pressing and releasing button B if configured as RST Button A must be connected to pin A27 via solder jumper J13 thi...

Страница 30: ...executing your firmware This startup code will enable the button A pullup resistor wait 8ms for the debouncing capacitor to charge then test the state of the button If it is not pressed the user firmw...

Страница 31: ...MT D21E User Guide Schematic Schematic July 11 2016 31 http www mattairtech com...

Страница 32: ...torage Bootloader Without Bootloader The Blink program was pre installed with the following commands ATSAMD21E17A shown atprogram t atmelice i SWD d atsamd21e17a cl 500khz program c verify f c MT_D21E...

Страница 33: ...an image with the 32 768KHz connected SAM BA bootloader configuration but I used the wrong image Note that if the 32 768KHz crystal is disconnected the crystal oscillator circuitry may still run at ar...

Страница 34: ...GNU Lesser General Public License along with this library if not write to the Free Software Foundation Inc 51 Franklin St Fifth Floor Boston MA 02110 1301 USA Bootloader files Portions of this code a...

Страница 35: ...llers This file can be freely distributed within development tools that are supporting such ARM based processors par THIS SOFTWARE IS PROVIDED AS IS NO WARRANTIES WHETHER EXPRESS IMPLIED OR STATUTORY...

Страница 36: ...ll rights reserved par ARM Limited ARM is supplying this software for use with Cortex M processor based microcontrollers This file can be freely distributed within development tools that are supportin...

Страница 37: ...S IS without any warranties with all faults at the buyer s and further users sole risk The user assumes all responsibility and liability for proper and safe handling of the goods Further the user inde...

Страница 38: ...with the higher temperatures of the regulator Note that the PTC fuse is located near the regulator so high temperatures will lower the PTC trip and hold currents CAUTION Normally power is supplied fro...

Страница 39: ...23uA quiescent current Optional auto direction sensing level shifter 16MHz and 32 768KHz crystals optional coin cell holder LED boot jumper PDI header button TWI pullups USB DFU bootloader preinstalle...

Отзывы: