Skip to content

Fixes for AM32 Passthrough #29056

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

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Conversation

andyp1per
Copy link
Contributor

Fixes some issues seen on AM32 passthrough. Tested on AM32 and BLHeli32

@andyp1per andyp1per added the BUG label Jan 13, 2025
@Huibean Huibean self-assigned this Jan 13, 2025
@andyp1per andyp1per force-pushed the pr-am32-passthrough branch from 47572a6 to d6ce676 Compare January 13, 2025 19:26
@tridge
Copy link
Contributor

tridge commented Jan 21, 2025

@MichelleRos could you test this on Nessie? It should make the am32.ca configurator more reliable with ArduPilot

@tridge
Copy link
Contributor

tridge commented Jan 21, 2025

or have you tested @Huibean ?

@Huibean
Copy link
Member

Huibean commented Jan 21, 2025

or have you tested @Huibean ?

I have tested it, still some issue with am32.ca, I am adding firmware flash test to my config python script to confirm
https://github.com/Huibean/am32_config

@Huibean
Copy link
Member

Huibean commented Jan 21, 2025

2024.01.21 test update

  • Flight Controller: Holybro Pixhawk4 mini
  • Reference Flight Controller Firmware: Betaflight
  • ESC: Vimdrones ESC Dev Board
  • last commit
commit d6ce6761145ab78a9fb6c1166a7a1fa22fc48427 (HEAD -> pr-am32-passthrough, andyp1per/pr-am32-passthrough)
Author: Andy Piper <[email protected]>
Date:   Wed Jan 8 16:28:05 2025 +0000

    AP_HAL_ChibiOS: reset DMA after exiting soft serial
    
    only configure DMA on groups that are actually being used for soft serial
  • am32.ca Test
  1. MSP connect
  2. Params Read
  3. Params Write
  4. Write default params(reported bug on am32.ca, both not working on Betaflight)
  5. Firmware Flashing(failed on Pixhawk4 min, success on Betaflight)
  • Script Unit Test:

using https://github.com/Huibean/am32_config

first run

  1. enter MSP
  2. enter MSP passthrough
  3. write default eeprom to bootloader only dev board
  4. flash firmware
  5. verify firmware booting and memory

second run

  1. enter MSP
  2. enter MSP passthrough
  3. read eeprom param
  4. flash firmware
  5. verify firmware booting and memory

Pixhawk4 mini
image
image
image

Betaflight
image
image

@tridge
Copy link
Contributor

tridge commented Jan 25, 2025

@Huibean with the fw upload failure with this PR, does it also fail with master?

@Huibean
Copy link
Member

Huibean commented Jan 25, 2025

Master should have issue enter the MSP pass through mode

@andyp1per
Copy link
Contributor Author

Master should have issue enter the MSP pass through mode

Yeah @tridge master is more broken. Its not clear to me that anything is broken now with this PR apart from the web configurator

don't cache connection result and return appropriate error if connection fails.
don't wait 1s to send first serial passthrough message
retry failed cmd_DeviceInitFlash as per betaflight
ensure the bootinfo structure is large enough
only configure DMA on groups that are actually being used for soft serial
@tridge tridge merged commit 8ea0003 into ArduPilot:master Feb 13, 2025
101 of 102 checks passed
@rmackay9
Copy link
Contributor

Although not directly related the AP AM32 DroneCAN ESC page includes instructions on how to update the firmware and set parameters using MP's DroneCAN page https://ardupilot.org/copter/docs/common-am32-escs.html

@andyp1per andyp1per deleted the pr-am32-passthrough branch February 13, 2025 09:36
@andyp1per
Copy link
Contributor Author

I think this should be considered for 4.6

@rmackay9
Copy link
Contributor

This is included in AP-4.6.0-beta4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 4.6.0-beta4
Development

Successfully merging this pull request may close these issues.

5 participants