Hi, I'm here again with the same problem. I can't receive three bytes sent via SPI. The communication runs at 12.5MHz, transaction appears about every 500 microseconds. Each transaction contains three bytes with 8 microseconds between bytes. The receiver uC is Microchip SAM C21 on Xplained board (exactly SERCOM5 on EXT2 header).
My best implementation was using DMAC and SPI drivers from ASF. It was working, but then I was developing other parts of application and now when I tested whole thing together I found that it does not work. Actually it received first few transactions okay and then next transactions was with 3rd byte always set to 0.
I assume that the uC is able to receive the communication without problems when it could receive few transactions correctly. I started to develop own SPI driver, but I need to keep the ASF due to the rest of application uses it (and there is no time to change it). So I make an empty ASF project where I made implementation based on example:
https://microchipdeveloper.com/32arm:samc21-code-gcc-sercom-spi-slave-example. According to LED it could receive something. The strange thing was that the LED changed state when 2nd or 3rd byte was received but it ignored first byte but it could be caused by clock configuration because I kept the default. I wanted to know what it received so I added CAN driver from ASF, but I also edited clock configuration. Since that time I can't receive anything from SPI even when I load previous application
Wire connection is still the same. Now I also tried to load app with SERCOM5 connected to SERCOM1 where SERCOM5 is master. It works better because it triggers receive interrupts, but received data are empty.
Is there a nice example how to periodically receive data via SPI (and could you share it with me please)? Or is it possible that the chip (shift register) is broken?