I2C Transmission

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

I2C Transmission

Postby Souhaiel » Sat Dec 05, 2020 1:01 am

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: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: I2C Transmission

Postby steved » Tue Dec 15, 2020 8:58 pm

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.


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 7 guests