Hey, thanks, GPIO_MUX_C was the missing puzzle.
There is still a bug when receiving frames, but at least I can now initialize it correctly. Thanks Tobias Von: devel [mailto:devel-boun...@riot-os.org] Im Auftrag von Alexandre Abadie Gesendet: Montag, 5. März 2018 18:23 An: RIOT OS kernel developers <devel@riot-os.org> Betreff: Re: [riot-devel] SPI on Arduino Zero for AT86RF233 Hi, Not sure it will help but I recently tried to use a Semtech LoRa radio with an Arduino Zero and using a second SPI (for the radio) was working with the following configuration: { .dev = &SERCOM1->SPI, .miso_pin = GPIO_PIN(PA, 19), .mosi_pin = GPIO_PIN(PA, 16), .clk_pin = GPIO_PIN(PA, 17), .miso_mux = GPIO_MUX_C, .mosi_mux = GPIO_MUX_C, .clk_mux = GPIO_MUX_C, .miso_pad = SPI_PAD_MISO_3, .mosi_pad = SPI_PAD_MOSI_0_SCK_1 } in the driver params, I had this line for the SPI: #define SX127X_PARAM_SPI (SPI_DEV(1)) Let us know if it works for you. Alex _____ Hey, I’m trying to use the AT86RF233 with the Arduino M0 Pro (using the Arduino Zero configuration). Using the default SPI configuration (and pins) didn’t work, why I tried to change the SPI to the Arduino_Pins 11,12,13 in order to have CS (PIN 10) using the same SERCOM as the other SPI pins. However, I didn’t get it to work and it seems that using SPI with SERCOM1 does not initialize. Is there anything I did completely wrong or is it just a stupid idea to connect the AT86RF233 with an Arduino M0? SPI Config in arduino/periph_conf.h: static const spi_conf_t spi_config[] = { { .dev = &SERCOM4->SPI, .miso_pin = ARDUINO_PIN_ICSP_MISO, .mosi_pin = ARUDINO_PIN_ICSP_MOSI, .clk_pin = ARUDINO_PIN_ICSP_CLK, .miso_mux = GPIO_MUX_D, .mosi_mux = GPIO_MUX_D, .clk_mux = GPIO_MUX_D, .miso_pad = SPI_PAD_MISO_0, .mosi_pad = SPI_PAD_MOSI_2_SCK_3 } , { .dev = &SERCOM1->SPI, .miso_pin = ARDUINO_PIN_12, .mosi_pin = ARDUINO_PIN_11, .clk_pin = ARDUINO_PIN_13, .miso_mux = GPIO_MUX_D, .mosi_mux = GPIO_MUX_D, .clk_mux = GPIO_MUX_D, .miso_pad = SPI_PAD_MISO_3, .mosi_pad = SPI_PAD_MOSI_0_SCK_1 } }; at86rf2xx_params.h: #ifndef AT86RF2XX_PARAM_SPI #define AT86RF2XX_PARAM_SPI (SPI_DEV(1)) #endif #ifndef AT86RF2XX_PARAM_SPI_CLK #define AT86RF2XX_PARAM_SPI_CLK (SPI_CLK_5MHZ) #endif #ifndef AT86RF2XX_PARAM_CS #define AT86RF2XX_PARAM_CS ARDUINO_PIN_10 #endif #ifndef AT86RF2XX_PARAM_INT #define AT86RF2XX_PARAM_INT ARDUINO_PIN_7 #endif #ifndef AT86RF2XX_PARAM_SLEEP #define AT86RF2XX_PARAM_SLEEP ARDUINO_PIN_8 #endif #ifndef AT86RF2XX_PARAM_RESET #define AT86RF2XX_PARAM_RESET ARDUINO_PIN_9 #endif #define AT86RF2XX_PARAMS_BOARD {.spi = AT86RF2XX_PARAM_SPI, \ .spi_clk = AT86RF2XX_PARAM_SPI_CLK, \ .cs_pin = AT86RF2XX_PARAM_CS, \ .int_pin = AT86RF2XX_PARAM_INT, \ .sleep_pin = AT86RF2XX_PARAM_SLEEP, \ .reset_pin = AT86RF2XX_PARAM_RESET} Thanks Tobias -- Tobias Guggemos, M.Sc Ludwig-Maximilians-Universität München (LMU) Institue of Computer Science Oettingenstr. 67, Room E003 D-80538 München, Germany Munich Network Management Team (MNM) Tel: +49 89 2180-9209 <http://www.mnm-team.org/~guggemos> http://www.mnm-team.org/~guggemos _______________________________________________ devel mailing list <mailto:devel@riot-os.org> devel@riot-os.org <https://lists.riot-os.org/mailman/listinfo/devel> https://lists.riot-os.org/mailman/listinfo/devel
_______________________________________________ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel