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

Add target BLACKPILL_F411 #8902

Merged
merged 15 commits into from
Mar 26, 2023
Merged

Add target BLACKPILL_F411 #8902

merged 15 commits into from
Mar 26, 2023

Conversation

HKR1987
Copy link
Contributor

@HKR1987 HKR1987 commented Mar 21, 2023

Two target:
BLACKPILL_F411_OSD
BLACKPILL_F411_BLACKBOX
Targets for STM32F411 "BlackPill" Development Board

@mmosca
Copy link
Collaborator

mmosca commented Mar 21, 2023

Not sure we should add blackpill as an official target.
Since it does not have the sensors required and users end up having to setup a custom target of some sorts anyway.
If you remove the targets from the pull request, we can include the change to src/main/target/system_stm32f4xx.c so it is easier to build the unofficial blackpill custom targets in the future.

@HKR1987
Copy link
Contributor Author

HKR1987 commented Mar 21, 2023

why not? :)Ppeople already choose what peripherals to connect, for example: compass, barometer or gps. Why shouldn't we be able to choose the MPU, because that's what it's all about. Not everyone can build their own target, and a ready-to-use one will certainly be more accessible.

@mmosca
Copy link
Collaborator

mmosca commented Mar 21, 2023

https://github.com/iNavFlight/inav/blob/master/docs/policies/NEW_HARDWARE_POLICY.md

  1. The new target must meet the following minimal requirements:
  • On-board sensors include at least the IMU (gyroscope + accelerometer)

@stronnag
Copy link
Collaborator

stronnag commented Mar 21, 2023

At a minimum, this requires SKIP_RELEASES in src/main/target/*PILL*/CMakeLists.txt

@HKR1987
Copy link
Contributor Author

HKR1987 commented Mar 21, 2023

Ok, so there is no chance :( so it must be unofficial

@mmosca
Copy link
Collaborator

mmosca commented Mar 21, 2023

@HKR1987 If you want to include this as an unofficial target, maybe you could add some documentation about the targets in: https://github.com/iNavFlight/inav/tree/master/docs/boards

A pin diagram, wiring examples for the supported IMUs and known issues would be a good start.

Copy link
Contributor

@VasilKalchev VasilKalchev left a comment

Choose a reason for hiding this comment

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

Confirming that the board works.

@HKR1987 HKR1987 requested a review from VasilKalchev March 22, 2023 09:40
@HKR1987
Copy link
Contributor Author

HKR1987 commented Mar 22, 2023

Ok, the documentation added

@mmosca
Copy link
Collaborator

mmosca commented Mar 22, 2023

Ok, the documentation added

Looking good but I think the header for multirotor and plane are swapped on the table listing servos and motors in your picture.

@HKR1987
Copy link
Contributor Author

HKR1987 commented Mar 22, 2023

Ok, the documentation added

Looking good but I think the header for multirotor and plane are swapped on the table listing servos and motors in your picture.

Sorry, my fault. Corrected, thanks :)

@mmosca
Copy link
Collaborator

mmosca commented Mar 22, 2023

I see that PINIO1 (PA13) is shared with SWDIO, can it be moved to a different unused pin?

I see this target being useful to learning, experimenting with new hardware/sensors it probably would be a good idea to keep the swd interface available for debugging.

@HKR1987
Copy link
Contributor Author

HKR1987 commented Mar 22, 2023

I see that PINIO1 (PA13) is shared with SWDIO, can it be moved to a different unused pin?

I see this target being useful to learning, experimenting with new hardware/sensors it probably would be a good idea to keep the swd interface available for debugging.

I dont think so. PA11 and PA12 used by usb, PC13 used by led and PC14 and PC15 using LSE oscilator (but not 100% sure for that). Maybe just make one more without pinio?
Or four targets:
Default without pinio
BLACKPILL_F411_BLACKBOX
BLACKPILL_F411_OSD
And with pinio
BLACKPILL_F411_BLACKBOX_PINIO
BLACKPILL_F411_OSD_PINIO
But i think its too much for one blackpill? :D

Edit: yes, there is LSE:
source: https://stm32-base.org/assets/pdf/boards/original-schematic-STM32F401CEU6_WeAct_Black_Pill_V3.0.pdf

@mmosca
Copy link
Collaborator

mmosca commented Mar 22, 2023

I see that PINIO1 (PA13) is shared with SWDIO, can it be moved to a different unused pin?
I see this target being useful to learning, experimenting with new hardware/sensors it probably would be a good idea to keep the swd interface available for debugging.

I dont think so. PA11 and PA12 used by usb, PC13 used by led and PC14 and PC15 using LSE oscilator (but not 100% sure for that). Maybe just make one more without pinio? Or four targets: Default without pinio BLACKPILL_F411_BLACKBOX BLACKPILL_F411_OSD And with pinio BLACKPILL_F411_BLACKBOX_PINIO BLACKPILL_F411_OSD_PINIO But i think its too much for one blackpill? :D

Edit: yes, there is LSE: source: https://stm32-base.org/assets/pdf/boards/original-schematic-STM32F401CEU6_WeAct_Black_Pill_V3.0.pdf

Maybe just drop pinio. It is not needed and requires extra hardware to be useful anyway

@HKR1987
Copy link
Contributor Author

HKR1987 commented Mar 22, 2023

I think other side: PINIO better than SWDIO. Beginer can use it. And when someone want use SWDIO (it must be advanced user) so there is not be problem for him to change it ;)

@VasilKalchev
Copy link
Contributor

It seems easier for a beginner to edit out pinio if they want to use a debugger. Maybe the pin conflict should be stated in the documentation.

@mmosca
Copy link
Collaborator

mmosca commented Mar 23, 2023

It seems easier for a beginner to edit out pinio if they want to use a debugger. Maybe the pin conflict should be stated in the documentation.

Sounds like a good enough compromise.

@HKR1987 could you mention that in the board documentation?

@HKR1987
Copy link
Contributor Author

HKR1987 commented Mar 23, 2023

It seems easier for a beginner to edit out pinio if they want to use a debugger. Maybe the pin conflict should be stated in the documentation.

It seems easier for a beginner to edit out pinio if they want to use a debugger. Maybe the pin conflict should be stated in the documentation.

Sounds like a good enough compromise.

@HKR1987 could you mention that in the board documentation?

Ok, done

@mmosca mmosca merged commit 83a77e7 into iNavFlight:master Mar 26, 2023
@gitfishup
Copy link

Hello, Does BLACKPILL_F411 have bootloader? @mmosca @HKR1987

@HKR1987
Copy link
Contributor Author

HKR1987 commented Feb 27, 2024

Hello, Does BLACKPILL_F411 have bootloader? @mmosca @HKR1987

Hi, it has DFU mode. Why you need bootloader?

@gitfishup
Copy link

Hello, Does BLACKPILL_F411 have bootloader? @mmosca @HKR1987

Hi, it has DFU mode. Why you need bootloader?

Sorry, I don't know the difference between DFU and bootloader. I will try to know about them.

@gitfishup
Copy link

Hello, Does BLACKPILL_F411 have bootloader? @mmosca @HKR1987

Hi, it has DFU mode. Why you need bootloader?

Other question, I have compiled a BlackPillF4 firmware, but i has 1.2M (inav_8.0.0_BLACKPILL_F411_BLACKBOX.hex). I can not write it to flash via st-link .
st-flash write /inav/build/inav_8.0.0_BLACKPILL_F411_BLACKBOX.hex 0x08000000
st-flash 1.6.0
2024-02-28T23:09:49 INFO common.c: Loading device parameters....
2024-02-28T23:09:49 INFO common.c: Device connected is: F4 device (low power) - stm32f411re, id 0x10006431
2024-02-28T23:09:49 INFO common.c: SRAM size: 0x20000 bytes (128 KiB), Flash: 0x80000 bytes (512 KiB) in pages of 16384 bytes
2024-02-28T23:09:49 INFO common.c: Attempting to write 1225626 (0x12b39a) bytes to stm32 address: 134217728 (0x8000000)
2024-02-28T23:09:49 ERROR common.c: addr too high
stlink_fwrite_flash() == -1

@mmosca
Copy link
Collaborator

mmosca commented Feb 28, 2024

This is not the place for user support.
maybe you want to join discord instead.

This is also an unofficial target, so there are no guarantees it works.

@gitfishup
Copy link

This is not the place for user support. maybe you want to join discord instead.

This is also an unofficial target, so there are no guarantees it works.

ok. thanks

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.

6 participants