Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

px4fmuv2:Add detection for Pixhack V3 #10231

Merged
merged 1 commit into from Aug 15, 2018

Conversation

Projects
None yet
3 participants
@davids5
Copy link
Member

commented Aug 14, 2018

The Simple HW detection was detecting the
Pixhack V3 as a mini.

This commit adds further discrimination, based on
the fact the Pixhack V3 left VDD_5V_PERIPH_EN
floating. Where a mini ,V2, V3 HW has it connected
to the active low enable of the VDD_5V_PERIPH and
VDD_5V_HIGHPOWER via a 10K pull down.

The detection enables the 40K pull up and samples
the pin. This reads back as a logical one on the
Pixhack V3, and a logical zero on the Mini.

Since the float is applied some 3.3 Ms post pin setting
at reset the 10 us should leave the 5 Volt supplies in
the on state because of the 10K pull down.
This is assuming typical 40K pullup 10K pull down
This results in typical 0.66V (.875V max) on the /EN pin
which should not be detected as a high on the TPS2041.

@dagar Detection wize this is safe, it would only affect a Mini and I reviewed that schematic in detail.
Please do check the rotations ar commensurate with the V3 Cube.

David Sidrane
px4fmuv2:Add detection for Pixhack V3
  The Simple HW detection was detecting the
  Pixhack V3 as a mini.

  This commit adds further discrimination, based on
  the fact the Pixhack V3 left VDD_5V_PERIPH_EN
  floating. Where a mini ,V2, V3 HW has it connected
  to the active low enable of the VDD_5V_PERIPH and
  VDD_5V_HIGHPOWER via a 10K pull down.

  The detection enables the 40K pull up and samples
  the pin. This reads back as a logical one on the
  Pixhack V3, and a logical zero on the Mini.

  Since the float is applied some 3.3 Ms post pin setting
  at reset the 10 us should leave the 5 Volt supplies in
  the on state because of the 10K pull down.
  This is assuming typical 40K pullup 10K pull down
  This results in typical 0.66V (.875V max) on the /EN pin
  which should not be detected as a high on the TPS2041.
@davids5

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2018

Pixhack V3 start up with this PR:

WARN  [platforms__common] Reboot NOW.
WARN  [ecl/EKF] EKF stopping navigation
WARN  [drivÿ
Pixhack V3 detected, forcing to fmu-v3
FMUv2 ver 0xE : Rev 0 V30
[boot] Fault Log info File No 4 Length 3177 flags:0x01 state:1
[boot] Fault Log is Armed
sercon: Registering CDC/ACM serial driver
sercon: Successfully registered the CDC/ACM serial driver
HW arch: PX4FMU_V2
HW type: V30
HW version: 0x0009000E
HW revision: 0x00000000
FW git-hash: 0c65783d2189db47c602bc32fe547998745c7bf6
FW version: 1.8.0 0 (17301504)
OS: NuttX
OS version: Release 7.22.0 (118882559)
OS git-hash: 145703fd42e2c593f40e7ecc7d3aad5d47c0ca1d
Build datetime: Aug 14 2018 11:55:12
Build uri: localhost
Toolchain: GNU GCC, 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
MFGUID: 333435373137510500210032
MCU: STM32F42x, rev. 3
UID: 210032:31375105:33343537
[hardfault_log] Fault Log is Armed
INFO  [tune_control] Publishing standard tune 1
INFO  [dataman] Unknown restart, data manager file '/fs/microsd/dataman' size is 350216 bytes
INFO  [load_mon] stack check enabled
INFO  [param] selected parameter default file /fs/mtd_params
rgbled on I2C bus 2 at 0x55 (bus: 100 KHz, max: 100 KHz)
nsh: rgbled_pwm: command not found
MS5611_SPI on SPI bus 4 at 3 (20000 KHz)
MS5611_SPI on SPI bus 1 at 3 (20000 KHz)
WARN  [bst] no devices found
WARN  [hmc5883] no device on bus 1 (type: 2)
WARN  [lis3mdl] no device on bus 2
INFO  [ist8310] no device on bus 1
INFO  [ist8310] no device on bus 5
WARN  [hmc5883] no device on bus 2 (type: 1)
WARN  [mpu6000] no device on bus #3 (SPI1)
MPU6000 on SPI bus 4 at 4 (1000 KHz)
INFO  [mpu6000] accel cutoff set to 30.00 Hz
INFO  [mpu6000] gyro cutoff set to 80.00 Hz
L3GD20 on SPI bus 4 at 1 (11000 KHz)
LSM303D on SPI bus 4 at 2 (11000 KHz)
MPU6000 on SPI bus 1 at 4 (1000 KHz)
INFO  [mpu6000] accel cutoff set to 30.00 Hz
INFO  [mpu6000] gyro cutoff set to 80.00 Hz
HMC5883_SPI on SPI bus 1 at 5 (11000 KHz)
WARN  [hmc5883] ERROR: TIMEOUT 1
WARN  [hmc5883] FAILED: SCALE
WARN  [hmc5883] failed to enable sensor calibration mode
ERROR [hmc5883] calibration failed
INFO  [mavlink] mode: Config, data rate: 800000 B/s on /dev/ttyACM0 @ 57600B
INFO  [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS1 @ 57600B
INFO  [mavlink] mode: OSD, data rate: 1000 B/s on /dev/ttyS2 @ 57600B
No autostart ID found
INFO  [logger] logger started (mode=all)
px4flow [182:100]
INFO  [px4flow] scanning I2C buses for device..

NuttShell (NSH)
nsh> INFO  [ecl/EKF] EKF aligned, (pressure height, IMU buf: 22, OBS buf: 14)
@dagar

This comment has been minimized.

Copy link
Member

commented Aug 15, 2018

Tested on a pixhack v3.

image

@LorenzMeier

This comment has been minimized.

Copy link
Member

commented Aug 15, 2018

Still WIP or good to go?

@dagar

This comment has been minimized.

Copy link
Member

commented Aug 15, 2018

Good to go!

@dagar dagar changed the title [WIP] px4fmuv2:Add detection for Pixhack V3 px4fmuv2:Add detection for Pixhack V3 Aug 15, 2018

@dagar

dagar approved these changes Aug 15, 2018

@dagar dagar merged commit 18ccf8d into master Aug 15, 2018

5 checks passed

Jenkins Firmware Compile This commit looks good
Details
Jenkins SITL Tests This commit looks good
Details
codecov/project 40.72% (target 20%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/jenkins/branch This commit looks good
Details

@dagar dagar deleted the master_ph3 branch Aug 15, 2018

@dagar dagar referenced this pull request Aug 15, 2018

Closed

PX4 Stable v1.8.1 Planning #10064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.