Skip to content

New board: SP Racing H7 Extreme#15385

Merged
dagar merged 40 commits intoPX4:masterfrom
Igor-Misic:pr-SPRacingH7Extreme
Aug 3, 2020
Merged

New board: SP Racing H7 Extreme#15385
dagar merged 40 commits intoPX4:masterfrom
Igor-Misic:pr-SPRacingH7Extreme

Conversation

@Igor-Misic
Copy link
Copy Markdown
Member

@Igor-Misic Igor-Misic commented Jul 20, 2020

SP Racing H7 EXTREME

Greetings PX4 community. Here is my pull request for a new board SP Racing H7 EXTREME.

The owner of the board is Dominic Clifton, the person behind Cleanflight. I think he will be greater reinforcement in the PX4 community. Please welcome him :)

More about the board here: http://seriouslypro.com/spracingh7extreme (don't rush to buy it, the FLASH is a bit different, contact Dominic first)

What is new and why took me so long to port PX4 to it?

  • the original board use W25N01G FLASH, that doesn't support memory-mapped mode
  • we change it with W25Q128 and now code is running from external FLASH over QSPI protocol
  • the board also using external FLASH for storing PX4 configuration
  • code is capable to switch between memory-mapped mode to indirect mode to write configuration
  • all board depended on code is in "board/SPRacing/h7extreme" folder
  • there is a small number of changes in "flashfs.c" to enable external FLASH as storage for config
  • a lot of time-critical code is moved into ITCM or RAM using linker script (check script.ld)

Board has a capability of 10 DShots but now it is limited to 8 DShot outputs and all of them work!

This is a very powerful board that waits to be unlocked.
Things that hardware support but still need to be worked on:

Short flight log:
https://review.px4.io/plot_app?log=a0e90555-5c41-49f1-b042-cbe11c9e7c0d

Interview with Dominic about the board:
https://www.youtube.com/watch?v=feyDb8ktpZ0

If you are interested in board contact Dominic for more details.
https://shop.seriouslypro.com/contact/ (don't forget mention you are looking for PX4 version)
PX4 version will be compatible with betaflight also :)

Some SPI and bootloader cleaning. 
Selected proper crystal frequency (8 MHz)
Added ram function for switching QSPI clock from bootloader values to PX4 working frequency.
…t configurable.

Added DMA stream and channel for timer.
… moved to uart1. Removed px4io port for now.

Reducing size in general.
@dagar
Copy link
Copy Markdown
Member

dagar commented Jul 24, 2020

Could you help move W25Q128 driver to a public dictionary, I think other boards like Kakute F7 mini could also use that. Thanks! #14995

Getting it into upstream NuttX (https://github.com/apache/incubator-nuttx) would be the ideal solution. If anyone else needs it short term we can find a more appropriate home in the PX4 tree (platforms/nuttx).

@bys1123
Copy link
Copy Markdown
Contributor

bys1123 commented Jul 24, 2020

@dagar Just did a quick search. I saw nuttx already have something like this.
https://github.com/apache/incubator-nuttx/blob/master/drivers/mtd/w25.c

@Igor-Misic
Copy link
Copy Markdown
Member Author

Igor-Misic commented Jul 28, 2020

Could you help move W25Q128 driver to a public dictionary, I think other boards like Kakute F7 mini could also use that. Thanks! #14995

This driver will not be helpful for your board because they are adopted to use the QSPI protocol from RAM. There are already drivers in Nuttx that you can use for your purpose. I also have in plan to switch this part to Nuttx code, when we switch Nuttx to a version that supports QSPI for H7 MCUs.

@julianoes julianoes requested a review from bkueng July 29, 2020 06:50
@hydra
Copy link
Copy Markdown

hydra commented Aug 1, 2020

An update for people following progress here.

Rather than update the SP Racing bootloader to support PX4 I've gone the route of making a second stage bootloader which can be used to launch memory mapped code on supported flash chips.

The code for this approach is here:

https://github.com/spracing/ssbl

The boot process is thus:
MCU reset
MCU boot option registers (Flash default)
SP Racing boot loader in MCU Flash loads EXST firmware from external flash.
Second Stage Boot Loader (SSBL) runs from RAM.
SSBL checks for supported flash chip, enables QSPI memory mapped mode and launches PX4 from external flash and all RAM used by SPRacing Bootloader and SSBL is available for use again.

The same SSBL, with modifications as required, could also be used for Ardupilot, iNAV or other firmware which is too large to run from the 448K of RAM used for the EXST firmware system.

However currently it doesn't work with the PX4 binaries @Igor-Misic provided me for testing which requires some investigation as it segfaults. It does quite happily actually run the code from memory mapped QSPI flash so the proof-of-concept appears sound, as you can step though the disassembly in a debugger.

Here you can see the PX4 startup code disassembly and Vector Table in the memory view.

image

@hydra
Copy link
Copy Markdown

hydra commented Aug 3, 2020

Horay, fixed!

spracing/ssbl@f5a226c

The second stage bootloader now boots PX4.

@dagar
Copy link
Copy Markdown
Member

dagar commented Aug 3, 2020

I'll merge this now and get it into the builds so we can continue working incrementally. Great work so far!

@dagar dagar merged commit 7eaa48e into PX4:master Aug 3, 2020
@hamishwillee
Copy link
Copy Markdown
Contributor

@hydra
Copy link
Copy Markdown

hydra commented Aug 4, 2020

Documentation and binaries for the SSBL published.

Documentation:
https://github.com/spracing/ssbl/blob/master/README.md

Binaries:
https://github.com/spracing/ssbl/releases/tag/v1.0.0

Please raise issues or PR's on the SSBL issue tracker as appropriate.

@hydra
Copy link
Copy Markdown

hydra commented Aug 4, 2020

@mrpollo
Copy link
Copy Markdown
Contributor

mrpollo commented Aug 4, 2020

@jinger26 @hamishwillee any actions required here?

@hamishwillee
Copy link
Copy Markdown
Contributor

@mrpollo Not sure yet, but any docs issues I'll follow up in PX4/PX4-user_guide#780 :-)

@Igor-Misic
Copy link
Copy Markdown
Member Author

If anyone is interested here is one footage of board in acro mode.
I used the Generic 250 Racer airframe with P/R/Y rates at 1000/1000/800.
Unfortunately, I was not able to try to tune it more since I crashed pretty bad at the end of the video (still not sure what happened but probably is faulty ESC).

Log: link to log
Video: link to video
Setup:
image

@hydra
Copy link
Copy Markdown

hydra commented Aug 29, 2020

@Igor-Misic yeah, feels like ESC juat gave up at the punch-out at the end of the video. Would be interesting to know more.

@Yoke365
Copy link
Copy Markdown

Yoke365 commented Sep 24, 2020

Horay, fixed!

spracing/ssbl@f5a226c

The second stage bootloader now boots PX4.

Where is the first stage bootloader,How to make them work? Are there any relevant documents

@hydra
Copy link
Copy Markdown

hydra commented Sep 28, 2020

@Yoke365 It's pre-installed on the FC.

@Yoke365
Copy link
Copy Markdown

Yoke365 commented Oct 10, 2020

@Yoke365 It's pre-installed on the FC.

Can we have PR for docs page? http://docs.px4.io/master/en/flight_controller/autopilot_manufacturer_supported.html

Done

PX4/px4_user_guide#780

Does this board provide a schematic diagram?

@davidbitton
Copy link
Copy Markdown

@Igor-Misic / @hydra

I'm having an issue with needing to use the SD Card. I need to add an extras.txt file to start the "external" (internal bus) mag, lis3mdl. I need to issue a lis3mdl start -I as well as a rgbled_ncp5623c start -I. However, the second has yet to work for me. My GPS module has an RGB LED, but doesn't want to light up. I confident the i2c connection is sound because I see the lis3mdl on the board.

The problem I have is that SSBL hangs when the card is inserted. Take it out, and Px4 boots up. Why would this be? Thanks.

@Igor-Misic
Copy link
Copy Markdown
Member Author

Igor-Misic commented Oct 10, 2020

SD works fine for me.
Are you sure the problem is with SSBL? Can you try with empty SD?
Also, you can connect the UART debugger (Nuttx console), maybe PX4 has a problem to start with your SD card.
It is on UART8 speed 57600.
image

@davidbitton
Copy link
Copy Markdown

I took an SD card from a Cube Pilot. I used the SD card formatting app. I inserted the card and applied power. The red light is solid, and the board doesn't appear as a USB device. If I remove the SD card, she boots as expected.

@Igor-Misic
Copy link
Copy Markdown
Member Author

Can you connect UART8 over USB to Serial adapter?

Wiring:
image

You should get information output like this:
image

@davidbitton
Copy link
Copy Markdown

I'll try. I just so happened to have knock that connector off the board. I haven't pulled the board yet, but hopefully I can reflow the connector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants