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

px4_io-v2 defconfig optimizations #14129

Merged
merged 13 commits into from
Apr 16, 2020
Merged

px4_io-v2 defconfig optimizations #14129

merged 13 commits into from
Apr 16, 2020

Conversation

dagar
Copy link
Member

@dagar dagar commented Feb 9, 2020

Review after #14128 is merged.

TODO: review watchdog and user main stack size on a real fully configured system (mixer loaded and running, RC connected and active). So far on the bench I haven't seen any actual watchdog usage and the user main stack could be reduced slightly, but we need to review this carefully on real vehicles.

Copy link
Member

@LorenzMeier LorenzMeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn’t reduce the TX buf. IIRC that number is matched to a frame size.

@dagar
Copy link
Member Author

dagar commented Feb 9, 2020

I wouldn’t reduce the TX buf. IIRC that number is matched to a frame size.

That's the console (IO_USART1_TX_DEBUG).

Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dagar

The Stack reductions were to agressive.

With the changes I have herein

PX4IO: starting
MEM: free 936, largest 936

With AF 13012, loaded

nsh>   px4io status
WARN  [px4io] loaded
protocol 4 hardware 2 bootloader 3 buffer 64B crc 0x8fbbc68e
8 controls 8 actuators 18 R/C inputs 2 analog inputs 0 relays
344 bytes free
status 0x2765 OUTPUTS_ARMED SAFETY_SAFE RC_OK SBUS FMU_OK MIXER_OK ARM_SYNC INIT_OK
alarms 0x0010 FMU_LOST
vservo 19 mV vservo scale 10000
vrssi 0
actuators -10000 -10000 -10000 0 10000 -9909 0 0
servos 900 900 900 900 0 0 0 0
reversed outputs: [________] trims: r:   0.0000 p:   0.0000 y:   0.0000
18 raw R/C inputs 1498 1498 1861 1489 1418 1003 1494 982 1494 1494 1494 1494 1494 1494 1494 1494 998 998
R/C flags: 0x0010
mapped R/C inputs 0x0000
ADC inputs 2 0
features 0x0001 S.BUS1_OUT
arming 0x0861 FMU_DISARMED FMU_NOT_PREARMED IO_ARM_OK INAIR_RESTART_OK ALWAYS_PWM_ENABLE
rates 0x000f default 50 alt 400 sbus 72
debuglevel 0
controls 0: -5736 -3862 113 0 0 0 0 0
controls 1: 0 0 0 0 0 0 0 0
controls 2: 0 0 0 0 0 0 0 0
controls 3: 0 0 0 0 0 0 0 0
input 0 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 1 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 2 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 3 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 4 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 5 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 6 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 7 min 1000 center 1500 max 2000 deadzone 10 assigned 255 options 0x0000
input 8 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 9 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 10 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 11 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 12 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 13 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 14 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 15 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 16 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
input 17 min 1000 center 1500 max 2000 deadzone 0 assigned 255 options 0x0000
failsafe 900 900 900 0 2100 900 1500 1500
disarmed values 900 900 900 900 0 0 0 0

boards/px4/io-v2/nuttx-config/nsh/defconfig Outdated Show resolved Hide resolved
boards/px4/io-v2/nuttx-config/nsh/defconfig Outdated Show resolved Hide resolved
boards/px4/io-v2/nuttx-config/nsh/defconfig Outdated Show resolved Hide resolved
boards/px4/io-v2/nuttx-config/nsh/defconfig Outdated Show resolved Hide resolved
@davids5 davids5 self-requested a review April 14, 2020 22:06
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Joy with param set SYS_AUTOSTART 24001

WARN  [shutdown] Reboot NOW.
reset done, 10 ms
[boot] Rev 0x0 : Ver 0x9 V5X90
[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: PX4_FMU_V5X
HW type: V5X90
HW version: 0x00000009
HW revision: 0x00000000
FW git-hash: 9e253285372f96b4f6046450313eeb7459724d41
FW version: 1.11.0 0 (17498112)
FW git-branch: pr-px4io_misc
OS: NuttX
OS version: Release 8.2.0 (134349055)
OS git-hash: ec417d7466666801e911e50d72766225ca7790a1
Build datetime: Apr 14 2020 14:53:06
Build uri: localhost
Toolchain: GNU GCC, 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
PX4GUID: 0002000000003833393330385107003f0023
MCU: STM32F76xxx, rev. Z
[hardfault_log] Fault Log is Armed
INFO  [param] selected parameter default file /fs/mtd_params
INFO  [tune_control] Publishing standard tune 1
Board defaults: /etc/init.d/rc.board_defaults
nsh: rgbled_pwm: command not found
Board sensors: /etc/init.d/rc.board_sensors
INFO  [ina226] Failed to init INA226 on bus 1, but will try again periodically.
ina226 #0 on I2C bus 1 (external)
INFO  [ina226] Failed to init INA226 on bus 2, but will try again periodically.
ina226 #1 on I2C bus 2 (external)
icm20602 #0 on SPI bus 1 (devid=0x38)
ism330dlc #0 on SPI bus 2 (devid=0x69)
bmi088 #0 on SPI bus 3 (devid=0x6a)
bmi088 #1 on SPI bus 3 (devid=0x66)
bmm150 #0 on I2C bus 4
bmp388 #0 on I2C bus 4
bmp388 #1 on I2C bus 4
nsh: battery_status: command not found
Board extras: /etc/init.d/rc.board_mavlink
INFO  [mavlink] mode: Config, data rate: 800000 B/s on /dev/ttyACM0 @ 57600B
Starting Main GPS on /dev/ttyS0
Starting MAVLink on /dev/ttyS6
INFO  [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS6 @ 57600B
+ MAV_TYPE: curr: 21 -> new: 2
INFO  [px4io] default PWM output device
INFO  [init] Mixer: /etc/mixers/dodeca_top_cox.main.mix on /dev/pwm_output0
ERROR [mixer_module] mixer load failed with -1
ERROR [mixer] failed to load mixers from /etc/mixers/dodeca_bottom_cox.aux.mix
ERROR [mixer] failed to load mixer
ERROR  [init] Failed loading mixer: /etc/mixers/dodeca_b

dagar and others added 4 commits April 15, 2020 20:20
Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>
Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>
Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>
Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>
@dagar dagar changed the title [WIP] px4_io-v2 defconfig optimizations to review px4_io-v2 defconfig optimizations Apr 16, 2020
@dagar dagar marked this pull request as ready for review April 16, 2020 00:23
@dagar
Copy link
Member Author

dagar commented Apr 16, 2020

Thanks @davids5

Screen Shot 2020-04-15 at 11 15 04 PM

Screen Shot 2020-04-15 at 11 15 40 PM

@dagar dagar merged commit 7c7ee11 into master Apr 16, 2020
@dagar dagar deleted the pr-px4io_misc branch April 16, 2020 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants