Hello people ,
I just want an Arduino due ( AT91SAM3X8E ARM Cortex- M3, 84MHz ) to receive 2 bytes from a master system to the selected I / O pins .the bytes are sent during a SPI communication , with the Arduino as slave . I´m trying to implement an SPI interface on selected I / O pins , because the SPI -header on the Arduino is already reserved for other purposes.
Here you have the listen () function , which is to read every bit coming on the MOSI line. The Works , is only effective for low clock frequencies. From 500 kHz , for example, it no longer works. I suspect from large frequencies can no longer keep up the polling in the function ... What do you think ? Can This function be improved or do we have interupt as the only solution ?
PS: The master works with CPOL = 0 and CPHA = 1
Forum.txt (1.51 KB)