lenvm / sercomspislave Goto Github PK
View Code? Open in Web Editor NEWSercom SPI library for ATSAMD21 boards such as Arduino Zero and Adafruit Feather M0
License: GNU General Public License v3.0
Sercom SPI library for ATSAMD21 boards such as Arduino Zero and Adafruit Feather M0
License: GNU General Public License v3.0
c:/users/user1/appdata/local/arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: core\variant.cpp.o: in function `SERCOM0_Handler':
C:\Users\user1\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.10\variants\feather_m0/variant.cpp:131: multiple definition of `SERCOM0_Handler'; sketch\Sercom0SPISlave.ino.cpp.o:C:\Users\user1\Documents\Arduino\libraries\SercomSPISlave\examples\Sercom0SPISlave/Sercom0SPISlave.ino:53: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Adafruit Feather M0 (SAMD21).
Dear lenvm,
Thank you for publishing your repository. I have an issue with using your SERCOM4 code. The pins that I'm using:
The pin configurations:
//Configure SERCOM4 SPI PINS
//Set PB10 as input (MOSI)
//Set PB11 as input (SCK)
//Set PA13 as input (SS)
//Set PA12 as output (MISO)
PORT->Group[PORTB].PINCFG[10].bit.PMUXEN = 0x1; //Enable Peripheral Multiplexing for SERCOM4 SPI PA12 Arduino PIN22
PORT->Group[PORTB].PMUX[6].bit.PMUXE = 0x3; //SERCOM 4 is selected for peripheral use of this pad (0x3 selects peripheral function D: SERCOM-ALT)
PORT->Group[PORTB].PINCFG[11].bit.PMUXEN = 0x1; //Enable Peripheral Multiplexing for SERCOM4 SPI PB09 Arduino PIN16
PORT->Group[PORTB].PMUX[4].bit.PMUXO = 0x3; //SERCOM 4 is selected for peripheral use of this pad (0x3 selects peripheral function D: SERCOM-ALT)
PORT->Group[PORTA].PINCFG[13].bit.PMUXEN = 0x1; //Enable Peripheral Multiplexing for SERCOM4 SPI PB10 Arduino PIN23
PORT->Group[PORTA].PMUX[5].bit.PMUXE = 0x3; //SERCOM 4 is selected for peripheral use of this pad (0x3 selects peripheral function D: SERCOM-ALT)
PORT->Group[PORTA].PINCFG[12].bit.PMUXEN = 0x1; //Enable Peripheral Multiplexing for SERCOM4 SPI PB11 Arduino PIN24
PORT->Group[PORTA].PMUX[5].bit.PMUXO = 0x3; //SERCOM 4 is selected for peripheral use of this pad (0x3 selects peripheral function D: SERCOM-ALT)
Furthermore, I am used to the ATMEGA328 chip. I have established the SPI communication before, but I've never done this on the ATSAMD21 chip. Do you know how to send and receive data from/to the ATSAMD21?
Thanks in advance.
Kind regards,
Cethaka
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.