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

F4BY Flight Controller MCU upgrade #28587

Closed
wants to merge 2 commits into from

Conversation

kozinalexey
Copy link
Contributor

hwdef:F4BY Flight Controller MCU upgrade
replace old MCU STM32F407VGT (1MB Flash) with STM32F427VET rev3 or above (2MB Flash)
fully tested including flight tests with Arducopter 4.5 stable
changed New style Pixracer LED configuration for master repo

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Nov 11, 2024
@Hwurzburg
Copy link
Collaborator

will both boards be available? its wiki page is very dated and has broken links... needs updating if this board is really available

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 11, 2024

hi, add board id [Tools/AP_Bootloader/board_types.txt] is required in this PR ?
i have test chibios / build (configure-all, chibios, 10) (pull_request) Failing

will both boards be available? its wiki page is very dated and has broken links... needs updating if this board is really available

The wiki and the store are under restoration, we decided to continue working on the project

@peterbarker
Copy link
Contributor

The wiki and the store are under restoration, we decided to continue working on the project

Fantastic!

Something H743 would be nice at some stage :-)

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 12, 2024

The wiki and the store are under restoration, we decided to continue working on the project

Fantastic!

Something H743 would be nice at some stage :-)

Hello Peter, you are absolutely right, we are already testing the board with H743 for new production. The configuration with 427 MCU is intended mainly for those who have already purchased F4BY and know how to solder. Unfortunately, F4 and H7 in a 100-pin package are not pin-to-pin compatible

@kozinalexey kozinalexey force-pushed the F4BY_F427_v2 branch 2 times, most recently from f6cfeed to b6ae7c7 Compare November 12, 2024 06:51
@kozinalexey
Copy link
Contributor Author

will both boards be available?

Yes, we will provide technical support for both boards. Another one with MCU H743 will appear soon, the first samples are already soldered at the factory

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 12, 2024

Error with test:

2024-11-12T11:17:40.9268736Z configure: F4BY_F427
2024-11-12T11:17:40.9293742Z ##[error]Process completed with exit code 1.
id added
from local master bootloader build fine
image

@kozinalexey
Copy link
Contributor Author

image
i selected ID 21 could this be causing the test error?

@Hwurzburg
Copy link
Collaborator

you did not include the bootloader with the new ID...
@peterbarker will have to comment on using the low ID number

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

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

-move all default params into hwdef

  • setup SD card in bootloader to enable SD card firmware upgrade

libraries/AP_HAL_ChibiOS/hwdef/F4BY_F427/hwdef.dat Outdated Show resolved Hide resolved
@kozinalexey
Copy link
Contributor Author

  • setup SD card in bootloader to enable SD card firmware upgrade

I have an almost ready board with an h743 MCU in it, I will make a bootloader from SD since the H7 bootloader size is 128. With f427 it is important to include it in the release faster, the CAN, Gimbals, Camera functions are in great demand by users

@kozinalexey
Copy link
Contributor Author

move all default params into hwdef

I have already made all the necessary settings in the parm file. parm file is depricated?

@Hwurzburg
Copy link
Collaborator

Uses flash unnecessarily

Tools/AP_Bootloader/board_types.txt Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/F4BY_F427/hwdef-bl.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/F4BY_F427/hwdef.dat Outdated Show resolved Hide resolved
@kozinalexey
Copy link
Contributor Author

excellent, I myself didn’t think of using a define in board_types.txt instead of specifying the ID in three places

@peterbarker
Copy link
Contributor

Commit list needs cleaning up. I can do that if everyone's happy with the PR otherwise.

We're after two commits:

board_types.txt: add new board type for F4BY_F427

and

hwdef: add F4BY_F427

@kozinalexey kozinalexey force-pushed the F4BY_F427_v2 branch 2 times, most recently from 84086a1 to c47c116 Compare November 18, 2024 10:01
@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 18, 2024

Commit list needs cleaning up. I can do that if everyone's happy with the PR otherwise.

We're after two commits:

board_types.txt: add new board type for F4BY_F427

and

hwdef: a

Hi, done. All checks passed

@Hwurzburg
Copy link
Collaborator

you pushed again after saying its done....is it really done?, if no more pushes I will review...

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 19, 2024

you pushed again after saying its done....is it really done?, if no more pushes I will review...

Hi,
its realy all done, include tests in flight
I already have the first batch of controllers F4BY v3.0.1 with H743 MCU on my desk and the config for it is also ready to be published

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

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

you haver not removed the defaults.param file...all those should be moved into the hwdef.dat file

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

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

you have not removed the defaults.param file and moved them into the hwdef.dat file

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 20, 2024

you have not removed the defaults.param file and moved them into the hwdef.dat file

thanks, ok, I'll do it. I couldn't find the instructions.

i got instruction here:https://ardupilot.org/dev/docs/porting.html
Please look, maybe this item needs to be removed or modified:
image

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 20, 2024

is it correct style?
found in another board setup:
https://github.com/ArduPilot/ardupilot/blob/ec1dc7cbc558ba94e687344bb084ac6fef113216/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat#L326C1-L332C34

# battery setup
define HAL_BATT_MONITOR_DEFAULT 4
define HAL_BATT_VOLT_PIN 13
define HAL_BATT_CURR_PIN 12
define HAL_BATT_VOLT_SCALE 16.04981
define HAL_BATT_CURR_SCALE 100

i found only one _default in AP_BattMonitor_Analog.cpp :
define HAL_BATT_MONITOR_DEFAULT 4

Peter says
define AP_BATT_CURR_AMP_OFFSET_DEFAULT 2.316

so:

# this constant defined in AP_BattMonitor_Analog.cpp
define HAL_BATT_MONITOR_DEFAULT 4
# this constants imports from AP_
define AP_BATT_VOLT_PIN_DEFAULT 13
define AP_BATT_CURR_PIN_DEFAULT 12
define AP_BATT_CURR_AMP_OFFSET_DEFAULT 2.316
define AP_BATT_AMP_PERVLT_DEFAULT 100
define AP_BATT_VOLT_MULT_DEFAULT 16.04981

is correct?

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 20, 2024

I built the firmware and tested it
with these parameters everything works correctly

# this constants with HAL_
define HAL_BATT_MONITOR_DEFAULT 4
define HAL_BATT_VOLT_PIN 13
define HAL_BATT_CURR_PIN 12
define HAL_BATT_VOLT_SCALE 16.04981
define HAL_BATT_CURR_SCALE 100

# this constant with AP_
define AP_BATT_CURR_AMP_OFFSET_DEFAULT 2.316

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 21, 2024

wiki page is very dated and has broken links... needs updating

wiki done.
updated links in README.md

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

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

need to change board_types file
need to split into two commits....one for Tools library and one for AP_HAL_ChibiOS library

I tried to do this for you but your PR does not allow changes by other devs

Tools/AP_Bootloader/board_types.txt Outdated Show resolved Hide resolved
@kozinalexey kozinalexey force-pushed the F4BY_F427_v2 branch 3 times, most recently from 962ddee to 771ee26 Compare November 21, 2024 14:37
@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 21, 2024

move up in file so as to be in proper order of numbers

I ran rebase to my path, now I need to wait again for the tests to finish. we take too long, this is causing problems.
It’s good that no one has taken my ID yet.

@kozinalexey
Copy link
Contributor Author

kozinalexey commented Nov 21, 2024

move up in file so as to be in proper order of numbers

done moved from 420 to 335 line

for prepare code to merge i must to run checks after changes. Checks need actual version of master. When i press rebase i see lost comments.

@kozinalexey
Copy link
Contributor Author

need to split into two commits....one for Tools library and one for AP_HAL_ChibiOS library

done

@Hwurzburg
Copy link
Collaborator

sorry the commit format is still wrong...would be an easy fix for me or @peterbarker if we had access permission to your branch

as to board id, you could have created a PR just for the board id bt itself and it would be merged in a day or two since its just a reservation.....

@peterbarker
Copy link
Contributor

Merged this via the other PR I created as I couldn't force-push this branch.

@kozinalexey
Copy link
Contributor Author

Merged this via the other PR I created as I couldn't force-push this branch.

Thank you so much, great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants