Commit graph

527 commits

Author SHA1 Message Date
dean
a110eb10db DM: update pwms, timer definitions 2018-08-30 15:12:32 -04:00
dean
a3493e3625 update clocks to match arduino samd 2018-08-30 15:12:32 -04:00
ladyada
49775dd780 see https://github.com/adafruit/ArduinoCore-samd/issues/37 2018-08-30 15:11:47 -04:00
dean
d3421947f9 DM: fix some pwms 2018-08-30 15:11:21 -04:00
dean
540780d3d1 DM: fix dac clock and first write bug 2018-08-30 15:11:21 -04:00
dean
87492c3a0d DM: fix dac not holding value bug 2018-08-30 15:11:21 -04:00
dean
8106e6bfa4 DM: fix interrupts, pcc pins 2018-08-30 15:09:31 -04:00
dean
c22cb29d06 DM: delete mistake file 2018-08-30 15:08:17 -04:00
dean
9b30cd8a59 DM: fix delay microseconds 2018-08-30 15:08:17 -04:00
dean
e9857aec00 DM: update pwms for samd51 2018-08-30 15:08:17 -04:00
dean
f618756fde DM: update feather m4 pinout for new rev 2018-08-30 15:08:16 -04:00
dean
0d70c98518 update pinout and stuff for new revision 2018-08-30 15:08:16 -04:00
dean
7f74c2126e update usb stuff 2018-08-30 15:08:16 -04:00
dean
2c2eb81a42 DM: fixed m0 boards compilation error with math additions 2018-08-30 15:03:49 -04:00
dean
bbff6c115d DM: some I2S stuff 2018-08-30 15:03:29 -04:00
dean
f286f9e8d4 DM: added math libraries 2018-08-30 15:03:03 -04:00
dean
f86a7b6af7 DM: updated magic number to match circuitpython stuff 2018-08-30 14:59:48 -04:00
dean
b8b35ee319 DM: fix worst bug in entire world 2018-08-30 14:59:48 -04:00
dean
fb011ea2a8 DM: we have a 12 bit dac lets use 2018-08-30 14:59:48 -04:00
dean
0908d0aee4 DM: fix tone 0 frequency 2018-08-30 14:59:17 -04:00
dean
2b0f87a73d DM: some usb host fixes (still not working) 2018-08-30 14:59:17 -04:00
dean
498e819a51 DM: fix upload bug 2018-08-30 14:59:16 -04:00
dean
9eecac827b DM: updates for rev B 2018-08-30 14:59:16 -04:00
dean
a7277e6547 DM: adding feather m4 2018-08-30 14:58:44 -04:00
dean
6820318d33 DM: EIC and VARIANT_MCK fix 2018-08-30 14:58:20 -04:00
dean
dc93e828f0 DM: fixed USB enumeration bug in bootloader and core 2018-08-30 14:56:11 -04:00
dean
4c1bca832e DM: update sercom IRQs for M4 2018-08-30 14:56:11 -04:00
dean
850c490a53 DM: fixed dpll1 freq 2018-08-30 14:56:11 -04:00
dean
33e58f40c4 DM: fixed SERCOM baud rates 2018-08-30 14:55:41 -04:00
dean
9ace80d803 DM: not crystalless 2018-08-30 14:54:36 -04:00
dean
01de36ef16 DM: oops committed wrong stuff, actually fixed DPLL problems 2018-08-30 14:54:36 -04:00
dean
1cc5f0cde4 DM: lets not feed PLLs from xosc 2018-08-30 14:54:36 -04:00
dean
8a32178667 DM: bugfixes 2018-08-30 14:53:34 -04:00
dean
059b15f5dd DM: added FPU support 2018-08-30 14:53:34 -04:00
dean
785aea4f65 DM: fixed DAC, SPI 2018-08-30 14:53:33 -04:00
dean
2ce0635ebc DM: added metro m4 variant 2018-08-30 14:51:09 -04:00
ladyada
bc2a5fc4be trinket m0 start 2018-08-30 14:46:42 -04:00
dean
c1827b289d DM: added support for samd51J20A 2018-08-30 14:46:42 -04:00
dean
4810822d26 DM: mostly fixed usb enumeration delay 2018-08-30 14:44:35 -04:00
dean
b5c2b6483b DM: clocked to 120MHZ, peripherals to 100, USB to 48 2018-08-30 14:44:35 -04:00
dean
77a2f2e9ea DM: fixed tone 2018-08-30 14:44:35 -04:00
dean
0a2393f4ce DM: fix switching between dac output and analogread 2018-08-30 14:44:35 -04:00
Phillip Burgess
158ed33b1c Allow attachInterrupt() on NMI pin (PA08 on ATSAMD21E) 2018-08-30 14:44:35 -04:00
dean
df5669a403 DM: fixed pwm and dac (almost) 2018-08-30 14:34:14 -04:00
ladyada
03eae9b5c5 Add Gemma m0 - tested just about everything 2018-08-30 14:34:13 -04:00
dean
358b11addd DM: added samd51 support 2018-08-30 14:32:21 -04:00
ladyada
3615cb1b47 bigger buffer for Wire 2018-08-30 14:27:14 -04:00
ladyada
8d5ac4304a another A6/A7 fix 2018-08-30 14:24:09 -04:00
ladyada
b34deb4e81 align back to mainline (and put in missing Serial5) - not sure if USB serial LEDs were causing hangups on 1200baud bumps? :/ 2018-08-30 14:23:07 -04:00
ladyada
d19c8e35a9 cleaned up slight difference in USB union bitflags with a new USBDevice.h - compiles blink 2018-08-30 14:21:26 -04:00
ladyada
605017712a fixed up DAC refs 2018-08-30 14:20:50 -04:00
ladyada
ae249718d4 add USB CDC RX & TX LEDs with 10ms minimum on time, tested 2018-08-30 14:18:05 -04:00
ladyada
012d86c1d3 make it so native USB is Serial 2018-08-30 14:12:25 -04:00
Todd Treece
9eda56e7db adds new boards.txt 2018-08-30 14:09:49 -04:00
ladyada
4e41949c96 add support for A6 (D8) and A7 (D9) 2018-08-30 14:03:04 -04:00
Martino Facchin
f4dfac890f Always call new DoubleBufferedEPOutHandler on reconnect
Avoid memory leak by deleting the buffers; DoubleBufferedEPOutHandler should be refactored (in beta branch) to allow separate "new" and "setup" procedures

Fixes #350
2018-08-24 12:24:49 +02:00
Sandeep Mistry
a62ef2633b UART frame error handling 2018-08-17 16:37:47 -04:00
gdsports
95bcb7cf3a Fix CDC_ENABLED
Undefining CDC_ENABLED triggered a compiler error. With this fix, the
CDC ACM configuration can be disabled.
2018-02-20 16:49:11 -05:00
Sandeep Mistry
69fcf8db46 Make ring buffer head and tail indexes volatile 2018-02-14 12:39:57 -05:00
Sandeep Mistry
b753095e56 Correct I2C frequency calculation formula
Allow variant to override the default rise time in nanoseconds via
define
2018-01-25 11:31:04 -05:00
Sandeep Mistry
a7c33fea4b UART: manually handle IRQ if DRE + interrupts disabled or in higher priority ISR
When write is called and TX buffer is full.
2018-01-25 11:27:16 -05:00
Mitchell Pontague
ee913a0828 samd21e sercom compatibility (#280)
Make sercom4 and sercom5 optional to allow compilation of samd21e variants.
2018-01-25 11:25:58 -05:00
Martino Facchin
2bb54068a2 Don't reallocate USB buffers if already allocated
USB Configuration was meant to run only once, but if the board comes back from standby the host can reconfigure the device again.
Probably a cleaner patch could be free()-ing the buffers on standby() to release the memory but at least we don't leak anymore.

Fixes https://github.com/arduino/ArduinoCore-samd/issues/293
2018-01-25 11:20:41 -05:00
Martino Facchin
503a9b3954 Make RingBuffer class template-based
This commit prepares to enlarge the ringbuffer for specific needs (at compile time).
Also, it fixes a spurious include in delay.h
2018-01-25 10:48:26 -05:00
Sandeep Mistry
d58b840f63 Add missing USBCON wrapper 2018-01-08 10:41:14 -05:00
agdl
8f5e2eb58c Changed boradcast variable to enableGeneralCall 2017-12-15 09:06:48 -05:00
agdl
6a1295459b Allow General Calls on I2C bus (aka brodcast) 2017-12-15 09:06:48 -05:00
Kees Bakker
fd15a1c603 Avoid read-modify-write when enabling SERCOM DRE interrupt 2017-12-11 08:55:04 -05:00
Sandeep Mistry
af14b97ee2 Use port manipulation instead of SERCOM h/w for UART RTS 2017-11-29 13:49:13 +01:00
Sandeep Mistry
c26a21f748 Make UART RTS + CTS configurable in constructor only 2017-11-29 13:49:13 +01:00
Sandeep Mistry
7fc402f3b5 Leverage SERCOM h/w functionality for RTS and CTS 2017-11-29 13:49:13 +01:00
Sandeep Mistry
bd1bd60815 Add optional RTS + CTS support to UART 2017-11-29 13:49:13 +01:00
Andreas Watterott
7e37bb3b12
No fixed value for USB power current. 2017-11-09 19:50:41 +01:00
Cristian Maglie
812d3e90cc Put interrupt mask instead of interrupt num in ISR callbacks list
This should save some cycles inside ISR Handler.
2017-09-08 17:00:17 +02:00
Cristian Maglie
9d9fe5c097 Slightly clearer formula for interrupt config register position 2017-09-08 16:55:33 +02:00
Cristian Maglie
1330914898 Some code makeup 2017-09-08 16:05:40 +02:00
Cristian Maglie
02d8bf82a2 Fixed allocation/deallocation of interrupts subroutines 2017-09-08 15:37:29 +02:00
Cristian Maglie
d2b717871b interrupts: remove unneeded cleanup 2017-09-08 11:35:02 +02:00
joverbee
9a49ce2fc4 Improve interrupt handling response time
Change the way ISRs are stored. Store now in a list on a ‘first come
first served basis’, the first interrupt that gets attached will be
served first. This improves the speed of the ISR calling from about 6us
to 2us for a single interrupt on extint14

See #200
2017-09-05 14:12:10 +02:00
joverbee
a9fa694eb7 Reset sense bits before or-writing the new sense signature
Solve #199
2017-09-04 16:51:36 +02:00
Cristian Maglie
af0263a60a More accurate approximation for multiplication factor of PLL to make 48Mhz.
Fix #223
2017-09-01 21:35:15 +02:00
Cristian Maglie
3d51b54386 Some updates on Stream and Print class. 2017-08-23 19:22:11 +02:00
Sandeep Mistry
0ee62489c0 Replace utoa + toupper with custom loop 2017-08-23 19:21:01 +02:00
Sandeep Mistry
61b060c732 Slim serial number to hex string conversion 2017-08-23 19:21:01 +02:00
Sandeep Mistry
9370464ad0 Use SAMD21 serial number for USB serial number prefix 2017-08-23 19:21:01 +02:00
Victor Nakoryakov
4ffc9d2bdb fix for pgm_read_ptr macro 2017-08-23 17:10:30 +02:00
Cristian Maglie
33709782bd Merge branch 'buffer-serial-tx' 2017-07-11 16:28:04 +02:00
Cristian Maglie
08de7f176c Fix prototypes to strictly match Arduino API
See https://github.com/arduino/Arduino/issues/4525
2017-07-11 16:00:11 +02:00
ladyada
06ae2087ce fix for crystal-less startup stability 2017-07-11 15:59:31 +02:00
Adminius
74a12d0f25 changes PWM resolution to 16bit for all timers
PWM frequency 732 Hz
2017-07-11 15:45:38 +02:00
Sandeep Mistry
46653a61e1 Change IRQ handler to check if data is available before check for DRE 2017-07-11 12:58:15 +02:00
Sandeep Mistry
610d4a8b8b Also check if TX buffer is empty before writing to data to UART reg directly 2017-07-11 12:58:15 +02:00
Sandeep Mistry
12b3774c3f Use reg instead of bit to enable/disable the DRE interrupt
The RXC interrupt was being disabled when using bit to disable the DRE
interrupt.
2017-07-11 12:58:15 +02:00
Sandeep Mistry
aa400fd434 Update flush to also wait for TX buffer to empty 2017-07-11 12:58:15 +02:00
Sandeep Mistry
158df98d0c Correct disableDataRegisterEmptyInterruptUART to use INTENCLR instead of INTENSET 2017-07-11 12:58:15 +02:00
Sandeep Mistry
b24c9e5b68 TX buffering for UART using RingBuffer 2017-07-11 12:58:12 +02:00
Sandeep Mistry
57c432e688 Add enable and disable data register interrupt APIs for UART 2017-07-11 12:51:58 +02:00
Sandeep Mistry
38992c2a9e Add availableForStore method to RingBuffer 2017-07-11 12:51:58 +02:00
per1234
a32ac8cdb9 Update comments to reflect Stream functions changed from private to protected
These functions were changed from private to protected but the comments were not updated at that time.

In conjunction with equivalent pull requests to Arduino AVR Boards and Arduino SAM Boards, solves #6146.
2017-07-07 10:12:25 +02:00
Sandeep Mistry
70b011b077 USB: Only swap incoming buffers for non-ZLP's 2017-05-02 10:01:03 -04:00