hello everyone,
I am using the CSRmesh development kit, and I try to connect one of the boards to a sensor(LPS25HB), using the SPI interface. But I am reading nothing from the spi.
Is there any document that clairifies the detailed behaivier of the firmware SPI APIs (for example, the timing diagram) ?
I connect the 4 lines of spi to my sensor,disconnect the SPI download line, call the SpiInit(), and then SpiReadByte(), but the returned value is not correct, am I missing somthing ?
thanks.
See x:\CSR_uEnergy_SDK-2.5.0.20\tools\include\CSR101x_A05\spi.h for SPI settings
Working with CSR1010 need a unique setting of the CSR1010 SPI PIO.
Read the PDF in the demo apps. x:\CSR_uEnergy_SDK-2.5.0.20\apps\spi_master\CS-304125-AN_SPIMasterExampleApplicationNote.pdf
I offer to use the I2C pins of LPS25HB to power saving and save free PIO.
It will work for you without changing any hardware PIO to LPS25HB
LPS25HB pin 2 SPI serial port clock (SPC) will be I2C I²C serial clock (SCL)
LPS25HB pin 4 SPI serial data input (SDI) will be I²C serial data (SDA)
LPS25HB pin 6 CS has to be high, 1 = I2C communication enabled;
Define the I2C on the CSR1010 to be peripheral I2C, And all will work in 10 min .
The slave address (SAD) associated to the LPS25HB is 101110xb. The SDO/SA0 pad can be used to modify the less significant bit of the device address. If the SA0 pad is connected to the voltage supply, LSb is ‘1’ (address 1011101b), otherwise, if the SA0 pad is connected to ground, the LSb value is ‘0’ (address 1011100b). This solution permits to connect and address two different LPS25HB devices to the same I²C lines.
See x:\CSR_uEnergy_SDK-2.5.0.20\tools\include\CSR101x_A05\i2c.h
Use extern void I2cInit(uint8 sda_pio, uint8 scl_pio, uint8 power_pio, pio_pull_mode pull);
Thank you for your help. I just got another question,
Is it safe to change the PIO of the I2C interface ? Since the I2C is already connected to a EEPROM, the main storage of the system. I use the uEnergoy development board.
When I see CSR8670 Block diagram, I can see i2c/SPI serial interface on it.
Can I work the SPI serial interface in order to connect some SPI slave chip with i2c serial interface on CSR8670. ?
In manual, spi debugging interface is available with dedicated pins, but spi serial interface is not available, but Block diagram is defined i2c/SPI Master/Slave is available.
Can you explain it in detail?
Because we shoud select a heatbeat chip about some project.
But SPI or I2C supporting is very important for me which chip is selected?
Please reply me urgent.
My CSR partner said that CSR8670 is not support SPI serial interface except SPI debugging port.
Is it right?
Hi Raymondchoi2009,
This forum is dedicated for the CSR101x family of chipset, please consult your local sales rep for questions concerning the CSR867x chipset.
@Liem