SAM D20 Xplained pro SPI Slave not receive data

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I used a Sam D20 Xplained pro connect to Atmega32 though SPI.

When Atmega32 is master and Atmega32 is slave I can receive data from master.

But in revert mode Atmega32 is master, Sam D20 is slave, I can't receive any data. 

I used ASF code (both Polling and Callback).

Have any point I must config for working?

Thanks.

This topic has a solution.
Last Edited: Wed. Aug 23, 2017 - 03:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
#define EXT3_SPI_MODULE              SERCOM5
#define EXT3_SPI_SERCOM_MUX_SETTING  SPI_SIGNAL_MUX_SETTING_E
#define EXT3_SPI_SERCOM_PINMUX_PAD0  PINMUX_PB16C_SERCOM5_PAD0 -- MOSI
#define EXT3_SPI_SERCOM_PINMUX_PAD1  PINMUX_PB17C_SERCOM5_PAD1 -- SS
#define EXT3_SPI_SERCOM_PINMUX_PAD2  PINMUX_PB22D_SERCOM5_PAD2 -- MISO
#define EXT3_SPI_SERCOM_PINMUX_PAD3  PINMUX_PB23D_SERCOM5_PAD3 -- SCK

I used default ASF code in SPI Slave Polled but in 

spi_is_ready_to_read

I cannot reach true.

have any suggestion?

Last Edited: Mon. Aug 21, 2017 - 11:11 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

flag receive_complete cannot true? Do you have any ideal? 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finally, I got solution.

Samd20 Xplained pro have power at 3.3v, I used 5v for atmega32. Now change to 3.3v it's working ok.