-
Notifications
You must be signed in to change notification settings - Fork 16.5k
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
AP_HAL_ChibiOS: add hwdef for LongBowF405WING #27009
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, thanks! This needs a bootloader. You can compile it by running:
./Tools/scripts/build_bootloaders.py LongBowF405WING
define AP_BATTMON_SMBUS_ENABLE 0 | ||
|
||
include ../include/minimize_fpv_osd.inc | ||
include ../include/save_some_flash.inc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed. It's not compiling
MCU STM32F4xx STM32F405xx | ||
|
||
# board ID for firmware load | ||
APJ_BOARD_ID 1422 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added to Tools/AP_Bootloader/board_types.txt
The commits should also be squashed |
@HiRCBro I've fixed up the commits in your PR |
In order to review I will need pinout/board image.....also, any UART intended for RC operation needs DMA so UART2 in alt configuration will not support CRSF/ELRS and perhaps even SRXL2 ptotocols....so those need to be on another UART...but no others have full DMA either...so RC protocols using bidir serial will have an issue with current definition I beleive |
the pinnout of each back side jst-gh connector is missing, labeled solder pads are clear, but what signals are in each JST-GH are not indicated on the back.... |
SBUS connect to UART2 with an inverter, if you use SBUS then UART2 cant work. if you use CRSF you cant connect to SBUS you need connect to UART2 or other UART |
UART2 and all other UARTs do not have full DMA required for CRSF/ELRS for sure...so you cant make those RC systems work reliably with this hwdef |
So i need change |
unfortunately dma does not get assigned to alternate function pins....so that wont do it....I dont know of a way to do it on a uart whose primary pin function is RCINT for RC .....best to get one of the other UARTs DMA enabled....UART6 unfortunately was not assigned a DMA channel in the resolver....maybe @tridge can make a suggestion, or you cna play with NODMA on some UARTS and see what the resolver produces for the others....you have to look at the hwdef.h file in the build directory after to waf configure for you board |
i am confused, i test uart2 with CRSF is OK, do you mean, CRSF must work with a full DMA uart, i check hwdef.h only uart1 is full DMA with RX and TX. |
if uart2 not suitbale for CRSF, we can use UART1, it is full DMA with RX and TX |
yes UART1 is the only one that can support CRSF/ELRS...so SBUS->RX2 s RCINT and all single wire RC, and UART1 can handle the two wire protocols |
SERIAL4_PROTOCOL -1 | ||
SERIAL1_PROTOCOL 23 | ||
SERIAL2_PROTOCOL -1 | ||
SERIAL6_PROTOCOL 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SERIAL6_PROTOCOL 2 | |
SERIAL5_PROTOCOL 42 | |
SERIAL6_PROTOCOL 2 | |
#Enable second OSD Type as DisplayPort | |
OSD_TYPE2 5 |
- SERIAL2 -> USART2 (RX tied to inverted SBUS RC input, but can be used as normal UART if :ref:`BRD_ALT_CONFIG<>` =1) | ||
- SERIAL3 -> UART3 (GPS) (TX DMA capable) | ||
- SERIAL4 -> UART4 (User) (TX DMA capable) | ||
- SERIAL5 -> UART5 (User, available on DJI air unit connector) (TX DMA capable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- SERIAL5 -> UART5 (User, available on DJI air unit connector) (TX DMA capable) | |
- SERIAL5 -> UART5 (DisplayPort, available on DJI air unit connector) (TX DMA capable) |
|
||
## OSD Support | ||
|
||
The LongBowF405WING supports using its internal OSD using OSD_TYPE 1 (MAX7456 driver). External OSD support such as DJI or DisplayPort is supported using UART5 or any other free UART5. See :ref:`common-msp-osd-overview-4.2` for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LongBowF405WING supports using its internal OSD using OSD_TYPE 1 (MAX7456 driver). External OSD support such as DJI or DisplayPort is supported using UART5 or any other free UART5. See :ref:`common-msp-osd-overview-4.2` for more info. | |
The LongBowF405WING supports using its internal OSD using OSD_TYPE 1 (MAX7456 driver). External OSD support such DisplayPor is setup by default using UART5. Simultaneous use of the internal OSD and Displayport is allowed. See :ref:`common-msp-osd-overview-4.2` for more info. |
- BATT_MONITOR 4 | ||
- BATT_VOLT_PIN 10 | ||
- BATT_CURR_PIN 11 | ||
- BATT_VOLT_MULT 11.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- BATT_VOLT_MULT 11.5 | |
- BATT_VOLT_MULT 11.0 |
per hwdef
|
||
## VTX power control | ||
|
||
GPIO 81 controls the VTX BEC output to pins marked "9V". Setting this GPIO high removes voltage supply to pins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GPIO 81 controls the VTX BEC output to pins marked "9V". Setting this GPIO high removes voltage supply to pins. | |
GPIO 81 controls the VTX BEC output to pins marked "9V" and "Vs1". Setting a RELAY function to this pin and turning it "ON" will remove the supply from these pins. |
## VTX power control | ||
|
||
GPIO 81 controls the VTX BEC output to pins marked "9V". Setting this GPIO high removes voltage supply to pins. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Camera Switch | |
GPIO 82 controls which camera input (CC1 or C2 is applied to the internal OSD. A RELAY function can be enabled to control the switching. | |
# Buzzer | |
An active buzzer output is provided and is controlled as GPIO 80 |
# LongBowF405WING Flight Controller | ||
|
||
The LongBowF405WING is a flight controller produced by [lefei rc](http://www.lefeirc.com/). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insert link to images here
also need an image of the PDB since it has external connections (probably ESCpwer out and VBAT in)
define HAL_BATT_VOLT_SCALE 11.0 # matched to PDB board | ||
define HAL_BATT_CURR_SCALE 50 # matched to PDB board | ||
|
||
# analog rssi pin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannt find that pinned out anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannt find that pinned out anywhere
This hardware has not been introduced, it is only reserved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is just a strawman at this point....please let me/us know if and when its real hardware and we will review it then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is just a strawman at this point....please let me/us know if and when its real hardware and we will review it then
HI, The current hardware does not have an interface, if it is not suitable, you can delete it first。
1,analog rssi pin
2. analog airspeed pin
its a matter of RELIABILITY.....CRSF and to a lesser extent ELRS will work without DMA, but not reliably... |
Understood, DMA can reduce CPU load and improve data processing capabilities |
hi
lefeirc PR new board with F405