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

Initial support for px4_fmu-v6xrt an i.MXRT1170 based FMUM #22263

Merged
merged 9 commits into from Nov 15, 2023
Merged

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Oct 25, 2023

Replaced #21321

To do's

  • USB VID and String Set
  • Fix CI issues

Bugs

@dk7xe

This comment was marked as outdated.

@davids5
Copy link
Member Author

davids5 commented Oct 26, 2023

@dk7xe VID updated - Please replace Bootloader. Also I removed some comment out code - that should not have been in the check for MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN. But there is still a bug that the signature in the RTC that keeps the bootloader active is not working (Again)

@davids5
Copy link
Member Author

davids5 commented Oct 26, 2023

reboot -b fixed

@davids5 davids5 force-pushed the pr-px4_fmu-v6xrt branch 3 times, most recently from 4d1113e to a98fc60 Compare October 26, 2023 12:36
@davids5
Copy link
Member Author

davids5 commented Oct 26, 2023

CI Builds clean! - There 1 commit on NuttX 8e8f80b79cd6cc30a0cc87d6c8b5f8332b0b66ea that I need to round trip after @PetervdPerk-NXP test it.
Then we need to do the NuttX merge with [PENDIG] on the Second commit. 47b20669a081edb972215105643b27ee940471b9 before merging.

@davids5 davids5 marked this pull request as draft October 26, 2023 13:36
@dk7xe

This comment was marked as outdated.

@davids5 davids5 force-pushed the pr-px4_fmu-v6xrt branch 2 times, most recently from 2fbec9a to 3f42a0f Compare October 30, 2023 11:01
@dk7xe

This comment was marked as outdated.

@davids5

This comment was marked as outdated.

@dk7xe
Copy link
Contributor

dk7xe commented Oct 30, 2023

@davids5, @dk7xe there is at least one issue on the telemetry unit that does not allow the flight.

@dmdobrea This is due to the handed out baseboard is no longer supported by this branch. We will keep u informed.

@davids5
Copy link
Member Author

davids5 commented Oct 30, 2023

For bug reports please include the output from ver all and the hardfault log file. Not Pictures; Also removed all OLD logged hard fault logs from the FMU's SD card.

@dk7xe
Copy link
Contributor

dk7xe commented Oct 31, 2023

Precompiled firmware images with ASSERTION=n - https://github.com/NXPHoverGames/NXP-FMUMRT/tree/main/firmware

@davids5
Copy link
Member Author

davids5 commented Nov 1, 2023

@dk7xe Please update your built files.

@dagar Please review the NuttX PR PX4/NuttX#223 and merge it first, then I will repoint this.

@davids5 davids5 marked this pull request as ready for review November 1, 2023 09:41
@dk7xe

This comment was marked as outdated.

@PetervdPerk-NXP
Copy link
Member

PetervdPerk-NXP commented Nov 2, 2023

But Airframe config just got lost. ;(

Let's assume that happened because of HW name change.

Maybe it's also a good idea to fully reset param and config start a new due to incompatibility with previous name

@dk7xe can you try QGC with a single link and see if that's stable or unstable.

@dk7xe

This comment was marked as outdated.

@davids5
Copy link
Member Author

davids5 commented Nov 3, 2023

The continous interrupt of USB communication happens on Windows as well. It starts always when trying to change a vehicle parameter.
Bad vibes due to "hardmount" of FMU on frame.

The communication interrupt issue

This is most likely that the ECO 712500-001 PX4 FMUVxX-BASE-T PINREF nARMED to VBUS_SENSE change was not done on base.

It sounds to me like you may have a bad FRAM. Use the commands shared in chat today to debug.

Log reboot on debug console, mtd status and `mtd erase' then reboot. Test with QGC on IP or do the ECO before setting parameters

@dmdobrea

This comment was marked as resolved.

@dk7xe
Copy link
Contributor

dk7xe commented Nov 11, 2023

@dmdobrea have u enabled the driver before building the code? most propably it's not enabled by default

@dk7xe
Copy link
Contributor

dk7xe commented Nov 11, 2023

@dk7xe @dmdobrea I worked with @PetervdPerk-NXP who has the same radios as use. We could the cause with booting from power brick. We believe that bug is now slayed.

@dagar - Let's bring it in. And we can continue with new PRS. !!!!!!!!!!!!!!!!!! Agree

tested on Vehicle ID20 - Pixhawk 6X-RT with Microhard on ETH and Holybro Telemetry V3
Both bootloader and FW were updated with 'make px4_fmu-v6xrt_ ... upload'

  • NO SDcard whipe done
  • NO parameter reset to default done
NuttShell (NSH) NuttX-11.0.0
nsh> ver all
HW arch: PX4_FMU_V6XRT
HW type: V6XRT000000
HW version: 0x000
HW revision: 0x000
PX4 git-hash: f2227e8e0ab4a7e2b19230d8a1d427c408e9aad9
PX4 version: 1.15.0 40 (17760320)
PX4 git-branch: pr-px4_fmu-v6xrt
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: ed4814f6239097dde5eecf2b4fbd58661db84dda
Build datetime: Nov 11 2023 23:39:40
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 9.3.1 20200408 (release)
PX4GUID: 00090000000000000000829297441d1a180e
MCU: i.MX RT1170 rB0, rev. 0
nsh> 

Results

  • No hardfaults at all
  • No errors showing up
  • Mavlink connection via Microhard radio connected to ETH working ok from boot
  • Holybro 433MHz telemetry radio on TELEM1 - working ok, no issues
  • Holybro 433MHz telemetry radio on TELEM2 - LED's blinking but no connection to QGC. Same observation than @dmdobrea
  • Holybro 433MHz telemetry radio on TELEM3 - working ok, no issues

@davids5 @dagar i agree merging to main.
The TELEM2 needs some more investigation but should not block the merge!

@dmdobrea

This comment was marked as resolved.

@davids5
Copy link
Member Author

davids5 commented Nov 13, 2023

Rebased on current main and brings in px4_firmware_nuttx-10.3.0+ with "NXP Do not wait on TXDMA semaphore"

nxp/rt117x:Fix Pin IRQ

nxp/rt117x:Support 4 i2c busses

nxp/rt117x:Add px4io_serial support

nxp/imxrt:Expand ToneAlarmInterface to GPT 3 & 4

px4_fmu-6xrt:Using imxrt_flexspi_nor_octal

px4_fmu-6xrt:Entry is start

px4_fmu-6xrt:Add Proper MTD

px4_fmu-6xrt:Set I2C Buses

px4_fmu-6xrt:Proper SPI usage

px4_fmu-6xrt:Adjust memory Map to use the 2 MB

px4_fmu-6xrt:Bring in ROMAPI

px4_fmu-6xrt:Push FLASH to 200Mhz

px4_fmu-6xrt:Use BOARD_I2C_LATEINIT

px4_fmu-6xrt:Clock Config remove unused devices

px4_fmu-6xrt:Remove EVK SDRAM IO

px4_fmu-6xrt:Enable SE550 using HW_VER_REV_DRIVE

px4_fmu-6xrt:Use MTD to mount FRAM on Flex SPI

px4_fmu-6xrt:Manifest

px4_fmu-6xrt:Restore board_peripheral_reset

px4_fmu-6xrt:Set I2C buss Interna/Externa and startup

nxp/rt117x:Set 6 I2C busses

px4_fmu-6xrt:Correct Clock Sources and Freqency Settings

px4_fmu-6xrt:Correct ADC Settings

px4_fmu-6xrt:Tune FlexSPI config and sync header with debug variant Linker prep for rodata ahb partitioning

px4_fmu-6xrt:FlexSPI prefetch partition split .text and .rodata

   Current config
     1KB Prefetch .rodata
     3KB Prefetch .text

px4_fmu-6xrt:Run imxrt_flash_setup_prefetch_partition from ram with barriers

px4_fmu-6xrt:Use All OCTL setting from FLASH g_flash_config SANS lookupTable

px4_fmu-6xrt:Octal spi boot/debug problem bypass

px4_fmu-6xrt:Add PWM test

px4_fmu-6xrt:Fix clockconfig and USB vbus sense

px4_fmu-6xrt: Use TCM

px4_fmu-6xrt: Ethernet bringup

imxrt: use unique_id register for board_identity

px4_fmu-6xrt: update ITCM mapping, todo proper trap on pc hitting 0x0

px4_fmu-6xrt:correct rotation icm42688p onboard imu

rt117x: Add SSARC HP RAM driver for memory dumps

px4_fmu-6xrt: Enable hardfault_log

px4_fmu-6xrt: Enable DMA pool

px4_fmu-6xrt: fix uart mapping

px4_fmu-6xrt: enable SocketCAN & DroneCAN

px4_fmu-6xrt:Command line history TAB completion

px4_fmu-6xrt:Fix pinning duplication

px4_fmu-6xrt:Support conditional PHY address based on selected PHY

px4_fmu-6xrt:Add Pull Downs on CTS, use GPIO for RTS

px4_fmu-6xrt:Set TelemN TX Slew rate and Drive Strenth to max

px4_fmu-6xrt::Set TELEM Buffers add HW HS

px4_fmu-6xrt:Turn off DMA poll

px4_fmu-6xrt:RC_SERIAL_PORT needed to be px4io to disable rc_input using TELEM2!

px4_fmu-6xrt: bootloader (#22228)

* imxrt:Add bootloader support
* bootloader:imxrt clear BOOT_RTC_SIGNATURE
* px4_fmu-6xrt:Add bootloader
* px4_fmu-6xrt:bootloader removed ADC
* px4_fmu-6xrt:bootloader base bootloader script off of script.ld
* px4_fmu-6xrt:add _bootdelay_signature & change entry from 0x30000000 to 0x30040000
* px4_fmu-6xrt:hw_config Bootloader has to have 12 bytes

px4_fmu-6xrt:Default to use LAN8742A PHY

px4_fmu-v6xrt:VID Set to Drone Code

board_reset:Enable ability to write RTC GP regs

px4_fmu-6xrt:Fix CMP0079 error

rt117x:micro_hal Add a PX4_MAKE_GPIO_PULLED_INPUT

px4_fmu-v6xrt:Set CTS High before VDD_5V applided to ports to avoid radios fro entering bootloaders

fmu-v6xrt: increase 5v down time

fmu-v6xrt:Ready for Release DEBUGASSERTS off and Console 57600,
Bootloder updated.

imxrt:board_hw_rev_ver Rework for 3.893V Ref

px4_fmu-v6xrt:Move ADC to Port3
@davids5
Copy link
Member Author

davids5 commented Nov 14, 2023

Rebased on current main and brings in px4_firmware_nuttx-10.3.0+ with [PENDING] imxrt:gpio disable imxrt_gpio_select for the 1170

@dk7xe
Copy link
Contributor

dk7xe commented Nov 14, 2023

Precompiled image based on 84766c4 is available on https://github.com/NXPHoverGames/NXP-FMUMRT/blob/main/firmware/README.md

@dagar dagar merged commit e90e8ae into main Nov 15, 2023
85 of 89 checks passed
@dagar dagar deleted the pr-px4_fmu-v6xrt branch November 15, 2023 16:10
@mrpollo
Copy link
Contributor

mrpollo commented Nov 15, 2023

Thanks @davids5 @dk7xe 🎉

@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-community-q-a-november-15-2023/35198/1

@dk7xe
Copy link
Contributor

dk7xe commented Nov 15, 2023

Thank you @davids5 @PetervdPerk-NXP for the great work done as well as @dagar for pushing the merge button finally!
Thank you also to you @mrpollo for the support on the QGC side and with organizational topics!

As mentioned in the community call earlier today. Several flights have been executed still today with 84766c4c

https://review.px4.io/plot_app?log=ee6552c5-1036-4c8e-9d2c-a2d18a82e5bd - first test with new FW
https://review.px4.io/plot_app?log=a4b16356-5074-456b-bbda-44110ee1807a - failsave test
https://review.px4.io/plot_app?log=7cb49b0b-d5fe-4586-8c82-aa3480b8370e - RC control failsave
https://review.px4.io/plot_app?log=08381332-3eba-4e53-b6c6-989b9bf6572e - mission
https://review.px4.io/plot_app?log=027fbe8d-4f31-4a4b-91e6-4cf659914c9c - mission
https://review.px4.io/plot_app?log=ea18e5c1-82e1-47e1-87a6-228e589175a3 - mission
https://review.px4.io/plot_app?log=710cd08d-e1de-481c-bb18-5e8982f2ef8b - mission
https://review.px4.io/plot_app?log=f5b07279-ba98-4789-a2e4-a445918eac8e - mission
https://review.px4.io/plot_app?log=f76e6a22-70d5-4228-8aee-c7b326650208 - mission
https://review.px4.io/plot_app?log=33b6e488-3257-435b-808f-7e667bc042c6 - mission
https://review.px4.io/plot_app?log=7909ae71-7609-4040-8412-e37578802792 - mission
https://review.px4.io/plot_app?log=fb3c60d5-4a30-4eb8-86fc-3563af4ba967 - mission
https://review.px4.io/plot_app?log=f0918648-2e94-4070-bb22-3e7cea166322 - mission

After tuning stable flights while still high vibrations caused by the folding props.

@farhangnaderi
Copy link
Contributor

farhangnaderi commented Nov 25, 2023

Finally, I got my gear ready. The first issue I noticed is no Global Position was received and besides, MAG1 estimation failure warning while calibrating. Any steps I might be doing wrong?

These logs might be helpful. By the way I have RC disabled since am using ELRS Radio.

https://review.px4.io/plot_app?log=06f22fb2-6e4e-47e4-ab24-624040edbbed
https://review.px4.io/plot_app?log=9f3fa474-a7f7-442c-8728-[3b7964d7acfa
https://review.px4.io/plot_app?log=324f021f-e9e0-4535-a61a-6b915daa24fb

@davids5
Copy link
Member Author

davids5 commented Nov 26, 2023

@farhangnaderi There is an issue with serial that is a WIP and fixed in #22386 but you will have to drop 7c406c9 and possibly others. You could just use that version of nuttx with main

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.

None yet

8 participants