SPI in RCM6700

Hello Everybody,

I’m working with a Rabbit minicore RCM6700, and I’m trying to write by SPI serial bus using the SPI.LIB library. I’m using Dynamic C version 10.70 and it’s libraries.

My code is:

#define SPI_CLOCK_MODE 2
#define SPI_SER_B
#define SPI_CLK_DIVISOR 100
#define CLOCK_PORT B
#define CLOCK_BIT 0
#define SPI_MASTER //we are master

#use “SPI.LIB”

When I try to read from an FPGA I get an invalid value, but I see, with an scope, that timing is correct and FPGA puts a correct value in RX line.
I have the same code with an RCM5700 and everything goes fine.

If you had the same error as me in the past, can you help me?

Thanks in advance


There is a patch for SPI in Dynamic C 10.xx:


Hello, in the Dynamic C 10.70 already the SPI.LIB file has been updated. No need to use this patch in DC 10.70. But check the application SPITEST_4000.C provided with this patch. It may helpful.