I2C Transmission

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
Souhaiel
Posts: 2
Joined: Fri Oct 09, 2020 4:30 pm

I2C Transmission

Post by Souhaiel »

Hey people i really need your help !

I am working on Tfmini lidar on I2C ! I want to weite a driver for it on pichawk 4 chibios.
I wrote a driver on raspberry pi and it works fine ! I need to send on i2c bus this tram of data (0x01,0x02,0x07) then i start to read data without a stop confition in the middle ! It works just fine on raspberry pi but i dont get a signification data on pixhawk 4 using i2cMasterTransmitTimeout().
Can someone help me ?
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: I2C Transmission

Post by steved »

Use i2cMasterTransmit() - that sends data, then if a receive buffer is defined sends a repeated start and enters read mode to read the specified number of bytes.
Post Reply