Go Down

Topic: Arduino Zero Sercom1 SPI Slave (Read 3186 times) previous topic - next topic

hhbcd

Thanks!

It's really helpful.


Hi hhbcd,

On my Windows based machine the register definitions are located at:

C:\Users\Computer\AppData\Local\Arduino15\packages\tools\arduino\CMSIS\4.0.0-atmel\Device\ATMEL\samd21\include\

In the "include" directory, there are two further directories: "instance" and "component".

Instance contains the register definitions for each peripheral instance, for example tcc0.h, tcc1.h, etc...

Component contains the structures and definitions for the peripheral's register bitfields, for example tcc.h.

MatthewHoworko

  • Changed DOPO to 0, to select PAD0 for MISO (corresponding to PA12:MISO on the board)
Hi Maverick123,

DOPO should be set to 0x3, which corresponds to PAD[0]: MISO , PAD[3]: SCK, PAD[1]: SS. The other option (0x0) will not select the correct SCK and SS pads.

Code: [Select]

SERCOM4->SPI.CTRLA.bit.DOPO = 0x3;


More info can be found on page 438 of the complete datasheet.

Go Up