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

New board: AIRLink board configuration added #19529

Merged
merged 13 commits into from
Apr 24, 2022

Conversation

aviaks
Copy link
Contributor

@aviaks aviaks commented Apr 23, 2022

Added AIRLink board configuration.

@dagar
Copy link
Member

dagar commented Apr 23, 2022

At the moment we have some CI duplication between Jenkins and Github actions, can you also add the board here?

px4_fmu-v6x,
spracing_h7extreme,
uvify_core

@dagar
Copy link
Member

dagar commented Apr 23, 2022

Overall the change looks good. Do you have any schematic or basic pin out that's available?

If you have any flight log (even from bench testing) please share and I'll verify that everything is running as expected with no errors.

@dagar
Copy link
Member

dagar commented Apr 23, 2022

Minor whitespace error failure in CI. https://github.com/PX4/PX4-Autopilot/runs/6141267293?check_suite_focus=true
Screenshot from 2022-04-23 13-05-40

@aviaks
Copy link
Contributor Author

aviaks commented Apr 23, 2022

At the moment we have some CI duplication between Jenkins and Github actions, can you also add the board here?

Sorry for forgetting to add this, now added.

Minor whitespace error failure in CI. https://github.com/PX4/PX4-Autopilot/runs/6141267293?check_suite_focus=true !

Thanks! Fixed now.

Overall the change looks good. Do you have any schematic or basic pin out that's available?

If you have any flight log (even from bench testing) please share and I'll verify that everything is running as expected with no errors.

Yes, I'll send the pinout on your email shortly. Please see the bench testing flight log attached - log_3_2022-4-23-18-24-20.ulg.zip

@dagar
Copy link
Member

dagar commented Apr 23, 2022

Log looks ok, but you apparently have very little free memory and I'm not yet sure why.

https://logs.px4.io/plot_app?log=b65ec398-780d-4b7e-89f9-9fb7c99d149f

Until we figure it out you could lower the logger buffer a bit, maybe add set LOGGER_BUF 32 in rc.board_defaults?

Your log has 4 mavlink instances running, what do you actually need/want by default? Run mavlink status to see.

@dagar
Copy link
Member

dagar commented Apr 23, 2022

For reference on a Holybro v5x configured with the same airframe (4015) I'm seeing 110-120 kB of free RAM (~25%)

@dagar
Copy link
Member

dagar commented Apr 23, 2022

I just noticed the eeprom driver failed to start.
Screenshot from 2022-04-23 14-07-18

Is this part physically present?

static const px4_mft_device_t i2c4 = { // 24LC64T on IMU 8K 32 X 256
.bus_type = px4_mft_device_t::I2C,
.devid = PX4_MK_I2C_DEVID(4, 0x50)
};

board_adc start

# Internal SPI bus MPU-9250 / SPI 2 [FPC]
mpu9250 -s -b 2 -M -R 6 start
Copy link
Member

@dagar dagar Apr 23, 2022

Choose a reason for hiding this comment

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

Suggested change
mpu9250 -s -b 2 -M -R 6 start
mpu9250 -s -b 2 -R 6 start

I would skip the mpu9250 mag if you have another internal magnetometer working. Long story, but when the mpu9250 ak8963 is enabled it disrupts the FIFO output and you don't get clean 8 kHz raw data.

Copy link
Member

Choose a reason for hiding this comment

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

If you plot vehicle_imu_status.gyro_raw_rate_hz or look at sensors status you'll be able to see the difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Then it makes sense indeed. I would still prefer to have magnetometer enabled on one mpu9250 but not on both for redundancy in addition to onboard bmm150.

@aviaks
Copy link
Contributor Author

aviaks commented Apr 23, 2022

Log looks ok, but you apparently have very little free memory and I'm not yet sure why.

https://logs.px4.io/plot_app?log=b65ec398-780d-4b7e-89f9-9fb7c99d149f

Yes, this is strange, trying to figure out why..

Until we figure it out you could lower the logger buffer a bit, maybe add set LOGGER_BUF 32 in rc.board_defaults?

Yes, done.

Your log has 4 mavlink instances running, what do you actually need/want by default? Run mavlink status to see.

Three if them are - USB, Telemetry 1 external UART port and UART to mission computer. The fourth looks like duplicated USB probably due to explicitly started in rc.board_mavlink..

image

@dagar
Copy link
Member

dagar commented Apr 23, 2022

How does it look now? Holybro px4_fmu-v5x for comparison.

nsh> free
                   total       used       free    largest  nused  nfree
        Umem:     431488     320272     111216     110144   1387     68
        Prog:    2097152    2097152          0          0     13      0

nsh> listener cpuload

TOPIC: cpuload
 cpuload
    timestamp: 1075749214 (0.470215 seconds ago)
    load: 0.6990
    ram_usage: 0.7408

@aviaks
Copy link
Contributor Author

aviaks commented Apr 23, 2022

How does it look now? Holybro px4_fmu-v5x for comparison.

nsh> free
                   total       used       free    largest  nused  nfree
        Umem:     431488     320272     111216     110144   1387     68
        Prog:    2097152    2097152          0          0     13      0

nsh> listener cpuload

TOPIC: cpuload
 cpuload
    timestamp: 1075749214 (0.470215 seconds ago)
    load: 0.6990
    ram_usage: 0.7408

This is with logger buffer set to 32:

image

@aviaks
Copy link
Contributor Author

aviaks commented Apr 23, 2022

Three if them are - USB, Telemetry 1 external UART port and UART to mission computer. The fourth looks like duplicated USB probably due to explicitly started in rc.board_mavlink..

image

Removing mavlink start from rc.board_mavlink removed the unused instance, now there are 3 of them in mavlink status (USB, Telemetry 1, telemetry to mission computer). So it looks good now.

@dagar
Copy link
Member

dagar commented Apr 23, 2022

Ok, that looks tolerable now, that mavlink USB instance is quite heavy. You shouldn't have been able to start duplicate instances on the same device, so I'll see why that was able to slip through.

Multi-EKF is also quite expensive, if you need more resources for whatever reason in the future an easy change will be EKF2_MULTI_IMU 3->2 or disabling it entirely (SENS_IMU_MODE).

@aviaks
Copy link
Contributor Author

aviaks commented Apr 23, 2022

I just noticed the eeprom driver failed to start. Screenshot from 2022-04-23 14-07-18

Is this part physically present?

static const px4_mft_device_t i2c4 = { // 24LC64T on IMU 8K 32 X 256
.bus_type = px4_mft_device_t::I2C,
.devid = PX4_MK_I2C_DEVID(4, 0x50)
};

Thanks for pointing to this! There is only one EEPROM (base), the second one was initialised in the code, but not present. Now fixed.

@aviaks
Copy link
Contributor Author

aviaks commented Apr 23, 2022

Ok, that looks tolerable now, that mavlink USB instance is quite heavy. You shouldn't have been able to start duplicate instances on the same device, so I'll see why that was able to slip through.

Thanks! Yes, that worked out for some reason but it showed zero rate data going through..

Multi-EKF is also quite expensive, if you need more resources for whatever reason in the future an easy change will be EKF2_MULTI_IMU 3->2 or disabling it entirely (SENS_IMU_MODE).

Good, thanks! Will keep this in mind!

@aviaks
Copy link
Contributor Author

aviaks commented Apr 23, 2022

Unfortunately, the build is failing here:

image

However, builds fine on my laptop. @dagar could you suggest what's wrong please?

@dagar
Copy link
Member

dagar commented Apr 23, 2022

However, builds fine on my laptop. @dagar could you suggest what's wrong please?

The build artifacts are probably caught in some bad intermediate state from previous partial builds. For now I would just clean (make distclean) and try again. If it's repeatable we can dig into it and find the root cause.

EDIT: It's failing on GitHub actions, I'll take a look.

@aviaks
Copy link
Contributor Author

aviaks commented Apr 24, 2022

However, builds fine on my laptop. @dagar could you suggest what's wrong please?

The build artifacts are probably caught in some bad intermediate state from previous partial builds. For now I would just clean (make distclean) and try again. If it's repeatable we can dig into it and find the root cause.

EDIT: It's failing on GitHub actions, I'll take a look.

Thanks Daniel!

@dagar
Copy link
Member

dagar commented Apr 24, 2022

@aviaks this was the problem 5c58e61.

This should be good to go now. I'll squash and merge all commits into master once the build goes through cleanly.

@aviaks
Copy link
Contributor Author

aviaks commented Apr 24, 2022

@aviaks this was the problem 5c58e61.

This should be good to go now. I'll squash and merge all commits into master once the build goes through cleanly.

Ah, my fault, this was an easy one.. Many thanks @dagar for resolving this!

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.

2 participants