Skip to main content
Share Your Experience: Take the 2024 Developer Survey
10 votes

Adding a custom board to the Arduino IDE

The simplest clean way to add your board using an existing core is to add the variant to your sketches folder's hardware subfolder. Only boards.txt and files for the board variant are added. In your ...
Juraj's user avatar
  • 18k
6 votes
Accepted

Built-in capacitive touch detection with SAMD21 development board (Arduino Zero Compatible)

You have three options for the silicon-based PTC (peripheral touch controlller). LibrePTC - My own library that targets the SAMD11 but should work with some modifications for other SAMD architectures....
Jeremy Gilbert's user avatar
5 votes
Accepted

Why is the IDE not able to find the board despite it being clearly seen and selected?

The SAMD boards connect to computer over native USB support of the MCU. The handling of the USB is done by Arduino core functions linked at build to your sketch. A consequence of using the native USB ...
Juraj's user avatar
  • 18k
3 votes
Accepted

add ID number to the feather m0 bootloader (flash)

This is quite an easy fix, actually. The problem here is the compiler doesn't think the const is used for anything - so it (quite rightly) throws it away. All you need to do is tell the compiler ...
Majenko's user avatar
  • 105k
3 votes

Achieving low power with Seeeduino Cortex-M0+ powered from 12V battery

As @devnull at Electronics Stack has answered, the quiescent current of 5~10 mA from the LDO could be enough to make up for the lost currents. I don't have any specific suggestions on code or parts, ...
angrypig7's user avatar
2 votes
Accepted

Arduino Zero D0/D1 set output high

You can do this by simply calling the right registers: Example 1, using a MASK D0/D1 are mapped to to PA10 & PA11 on the M0 /* The following ports where selected PORT_PA11 PORT_PA10 ...
PhillyNJ's user avatar
  • 1,178
2 votes
Accepted

High-frequency PWM on an Adafruit Feather M0

For your specific problem: the Feather's D11 is the SAMD's PA16 and on TCC0/WO[6] (use REG_TCC0_CCB2 and PORT_PMUX_PMUXE_F), and also on TCC2/WO[0] (use REG_TCC2_CCB0 and PORT_PMUX_PMUXE_E). An easier ...
ocrdu's user avatar
  • 1,795
2 votes
Accepted

Half-duplex for Atmel SAMD21

Up to six Serial Communication Interfaces (SERCOM), each configurable to operate as either: USART with full-duplex and single-wire half-duplex configuration I2C up to 3.4 MHz SPI LIN slave It is an ...
Juraj's user avatar
  • 18k
1 vote

attachInterrupt has no effect on Industruino SAMD21

Industrial level I/O on Industruino, which includes CH1, CH6 and CH7 I tried, is not connected directly to the microcontroller. It uses a buffer and communicates through I2C in pull mode. That's why ...
Paul Jurczak's user avatar
1 vote
Accepted

Multiple variant.cpp entries for same physical pin

The analogWrite function checks the PIN_ATTR_ANALOG attribute from pin description in variant.cpp to determine if the pin has DAC capability. Then it checks if the pin is ADC_Channel0 or DAC_Channel0. ...
Juraj's user avatar
  • 18k
1 vote
Accepted

Problems connecting to WiFi101 access point

The bug seems to be that the server must be started after the wifi has moved into the WL_AP_CONNECTED state. I am not sure why this is, but apparently sockets are invalid (or become invalidated) when ...
David's user avatar
  • 129
1 vote

Peculiar behaviour of arduino pro micro

You have to connect ground between the modules. Without common ground the logic level of signal can't be measured. While both boards were powered over USB from the same laptop the boards had common ...
Juraj's user avatar
  • 18k
1 vote
Accepted

What is the REF pin for -- pin 9 on ATSAMD21G18-QFN48?

PA04 pin can be a normal GPIO or a voltage reference pin (similar to VDDANA). So, the ADC input will be compared to this VREF pin in the application if needed. If you have configured it as GPIO, then ...
ArduinoFan's user avatar
  • 1,059
1 vote
Accepted

Atmel SAMD21 microcontroller not making a USB port anymore

Solutions to the problem: External Hardware Reset -- using a reset button (that I externally managed to solder using the Reset pin-out) -- to get into bootloader mode and start the program from the ...
Abstract123's user avatar
1 vote

Linking the Arduino Bootloader In Atmel Studio

This isn't exactly 100% the answer I was looking for, because I still want to know how I can use a static library build, as I mention in my post, and compile everything as a single binary. This method ...
Andrew's user avatar
  • 107
1 vote

"SparkFun SAMD21 Mini Breakout" 'Serial1' was not declared in this scope

Ahhhh, I figured it out. I had to add #include "Arduino.h" to the .cpp file.
exchangenoob's user avatar
1 vote

External RAM (23LC1024) and external Flash (W25Q64JVSSIQ) with Sparkfun SAMD21

You are correct, MISO, MOSI and SCK are common to all the SPI devices. Be sure they are all set up for clock polarity etc. The CS\ line is the select line. If the device is not selected it does not ...
Gil's user avatar
  • 1,833
1 vote

Half-duplex for Atmel SAMD21

You can use USART in half duplex mode. SERCOMx.PAD0 or SERCOMx.PAD2 are available for this. Refer to document "AT03256: SAM D/R/L/C Serial USART (SERCOM USART) Driver" section "10. ...
Dmitrii's user avatar
  • 21
1 vote

How to burn arduino bootloader on SAMD21 chips using J-Link mini

The Atmel EDBG would work for Arduino Zero since that has the EDBG chip. With Jlink, you can use Atmel Studio. Once the Jlink is connected to the chip via the 10 pin SWD header, goto the programmer ...
karan's user avatar
  • 291
1 vote
Accepted

How to determine the source of constants in libraries?

The name TC_CTRLA_PRESCALER_DIV1 indicates this is a macro. A trick for quickly finding the exact location of a macro definition is: File > Preferences > Compiler Warnings > All > OK In your sketch, ...
per1234's user avatar
  • 4,178
1 vote

How to determine the source of constants in libraries?

First of all, the definitions of these constants won't tell you very much. They just represent the registers and bits used in the datasheet of the microcontroller. If you do want to find their ...
tttapa's user avatar
  • 1,320
1 vote

samd21 linking, change the base addresse from the default

A typical LD script consists of two sections - one that defines memory ("MEMORY") regions, and another that defines what to put in those memory regions ("SECTIONS"). To carve holes in an existing ...
Majenko's user avatar
  • 105k

Only top scored, non community-wiki answers of a minimum length are eligible