ms6511 over spi
Posted: Mon Nov 10, 2014 11:21 pm
I found some misunderstanding about SPI using.
I need to read some 16bit registers from MS5611:

If I try to read using non-blocking function:
values reads great, but if I use blocking function:
spiExchange function blocks and doesn't return.
What I can miss? Or maybe I dons't understand something?
I need to read some 16bit registers from MS5611:

If I try to read using non-blocking function:
Code: Select all
txbuf[0] = MS5611_CMD_PROM_READ_C1;
txbuf[1] = 0x00;
rxbuf[0] = 0x00;
rxbuf[1] = 0x00;
spiStartExchange(&MS5611_SPI, 2, txbuf, rxbuf);
chThdSleepMilliseconds(10);
values reads great, but if I use blocking function:
Code: Select all
spiExchange(&MS5611_SPI, 2, txbuf, rxbuf);
spiExchange function blocks and doesn't return.
What I can miss? Or maybe I dons't understand something?