Sparkfun SC16IS750 not working on Raspberry Pi

I am connecting the SCIIS750 spi-2-uart bridge to the Raspberry Pi 2 to increase the number of uart ports. The product is a billboard created by Sparkfun ( https://www.sparkfun.com/products/9981 ) using the SC16IS750 chip ( http://www.nxp.com/documents/data_sheet/SC16IS740_750_760.pdf ). I am using the Mike McCowley BCM2835 library to access the SPI.

The problem is which register I'm trying to read, I always return 0xff. For instance,

uint8_t tx[2]; tx[0] = 0x07 << 3 | 0x80; // SPR register tx[1] = 0x00; uint8_t rx[2] = {0x00, 0x00}; // perform duplex write operation bcm2835_spi_transfernb(tx, rx, 2); 

rx [0] and rx [1] returns 0xff. It doesn't matter which register I'm trying to read, the result is the same.

The breakout board already supports reset output. I connect the CS pin to SSEL1, CLK to GPIO11, SI to GPIO10, SO to GPIO9 and SPI / I2C to ground. I tried another chip, same answer. SPI works fine, as I also successfully use it with another peripheral device.

Any idea on what I should try next?

+5
source share
1 answer

It turns out the problem is the clock divider. Setting the SPI clock divider to 256 or higher

 bcm2835_spi_setClockDivider(BCM2835_SPI_CLOCK_DIVIDER_256) 

solved the problem.

0
source

All Articles