Browse Source
There are several boards that share the px4fmu-v2 build as px4fmu-v3 build. It was initially envisioned, that the build would be binary compatable and the RC script would probe different sensors and determine at runtime the HW type. Unfortunately, a failed sensor, can result in mis-detection of the HW and result in an improper start up and not detect the HW failure. All these boards's bootloader report board type as px4fmu-v2. This precludes and automated selection of the correct fw if it had been built, by a different build i.e. px4fmu-cube etc. We need a way to deal with the slight differences in HW that effect the operations of drivers and board level functions that are different from the FMUv2 pinout and bus utilization. 1) FMUv3 AKA Cube 2.0 and Cube 2.1 Bothe I2C busses are external. This effected the mag on GPS2 not reporting Internal and having the wrong rotation applied. 2) FMUv3 does not performa a SPI buss reset correctly. FMUv2 provides a SPI1 buss reset. But FMUv3 is on SPI4. To complicate matters the CS cross bus boundries. 3) PixhawkMini reused a signal that was associated with SPI4 as a SPI1 ready signal. Based on hardware differnce in the use of PB4 and PB12 this code detects: FMUv2, the Cube, and PixhawkMini and provides the simple common API for retriving the type, version and revision. On FmuV5 this same API will be used.sbg
David Sidrane
8 years ago
committed by
Lorenz Meier
2 changed files with 159 additions and 0 deletions
Loading…
Reference in new issue