Go Down

Topic: SPCR, SPE, MSTR,and SPSR missing (Read 1 time) previous topic - next topic


I got a MKR1000 and I'm trying to use it with a CC1101 transceiver using SPI, The library and code I'm using complies fine when set to other boards but on the zero and MKR1000, its saying all these variables was not declared in this scope. some of the variables it says are not declared are SPCR, SPE, MSTR, SPSR, SPDR, and SPIF. How can I fix this or do I need to change these to a different name?


Hi RedDragon,

Those registers are only present on AVR boards. The Zero and MKR1000 use a SAMD21 chip, it's better to update the code to use the SPI library: https://www.arduino.cc/en/Reference/SPI - it this way the code will be portable to all Arduino boards.


Any tips on how to do this easily, I'm new to ardunio


Have you looked for other libs that are SAMD compliant ?
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up