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_RX_PORT SPI_RX_PD
#define SPI_MODE_SERIAL
#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

Carmen

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

http://www.digi.com/support/downloads/index?Hu88OhfOyta1iXqAaeDCVt1oxGv8ROm9JKrc0XGVAw3MgH3via8Ivhx6pcb3NF7B

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.