ThunderFly-aerospace / PX4-Autopilot

PX4 Professional Autopilot Firmware
http://px4.io
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

TFRPM01 RPM driver can start on bus without connected sensor board. #30

Closed roman-dvorak closed 2 years ago

roman-dvorak commented 4 years ago

At driver start-up, the driver should verify that the sensor with the selected address on the given bus really exists. If not, it should exit.

This is the standard way to turn on drivers without having to know the right bus. The standard way is to start the driver with -X parameter. This will start the driver in multiple instances (for every external bus) and instances for the bus without sensors will exit

slimonslimon commented 4 years ago

I know this, but i when i was writing the driver, I didnt found universal I2C "who am I".... now, i know, that i should identify device somehow...

roman-dvorak commented 4 years ago

Can be it done as: "Write the configuration register and then read it, if it is written there? If it differs, the sensor is disconnected?"

slimonslimon commented 3 years ago

I will try improve it. "Onetime, nexttime"

kaklik commented 2 years ago

The identification procedure for that i2c device could not be implemented. The device does not contain a register, which could be used for reliable identification at startup. All registers are zero after power up and nothing is changed until a pulsed signal appears at the clock input.

roman-dvorak commented 2 years ago

I solved this by writing to free RAM registers, which will not affect anything. They will then verify their value. It is done on multiple registers, where it is unlikely that it will work fully with another IO. However, it could be reset in some way. But this is practically only used during initialization. So it wouldn't have to be a problem.