Receive more than 16 bits in SPI Slave mode

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

Hi,

 

I configured my SAM3X to receive data via SPI in Slave mode. The SPI Master sends me 24 bits when CS is activated. But in the SAM3X the maximum is 16 bits in SPI_CSR0. So in the SPI0_Handler interrupt unction, I'm not able to get more than 16 bits, even if I call spi_read() several times, and next time the SPI0_Handler is called again, I get the first 16 bits of the next message. So I loose the last 8 bits of each message.

 

I can't believe that we cannot read more than 16 bits when CS is activated, so I probably do something wrong in my code. Could someone give me some advice on this issue?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi I am Newbie here, but I was able to read 32 bits from a MAX31855 chip using spi with dma in the form of 4 consecutive bytes. I have the SAM V71Q21 and I have an instance of SPI master that gets called once every second from a TC interrupt. Are you still having trouble? Could you tell me if there is some better reference material for using the ASF? The documentation at Atmel I am not very good at deciphering. Is there any third party reference material to help explain the use of the AFE?