Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

211
Visualizações
Sparkfun SC16IS750 does not work on Raspberry Pi

I'm connecting a SC16IS750 spi-2-uart bridge to the Raspberry Pi 2 in order to increase the number of uart ports. The product is a breakout board made by Sparkfun (https://www.sparkfun.com/products/9981), utilizing the SC16IS750 chip (http://www.nxp.com/documents/data_sheet/SC16IS740_750_760.pdf). I use the BCM2835 library by Mike McCauley to access SPI.

The problem is, whichever register I try to read, I invariably get back 0xff. For example,

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 try to read, the result is the same.

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

Any idea on what I should try next?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Turns out the problem is the clock divider. Setting the SPI clock divider to 256 and above

bcm2835_spi_setClockDivider(BCM2835_SPI_CLOCK_DIVIDER_256)

resolved the problem.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda