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 SPEEDYBEEF405WING target #608

Merged
merged 13 commits into from
Jan 13, 2025

Conversation

ot0tot
Copy link
Contributor

@ot0tot ot0tot commented Nov 14, 2024

No description provided.

configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
@haslinghuis
Copy link
Member

@ot0tot anything needed to add this ?

@ot0tot
Copy link
Contributor Author

ot0tot commented Dec 24, 2024

@ot0tot anything needed to add this ?

The major issue is the EXT1 pin is not connected, so there is no way to sync the gyro with the PID loop. I have a FC, but have not been able to test the target yet.
If you have a Wing FC, please feel free to test and provide feedback. If any of the devs have a way to validate the PID loop rate performance, that would be great also.

@SteveCEvans
Copy link
Member

The lack of the interrupt isn't a major issue. The consequence is increased jitter and thus poorer filter performance. Also DMA transfers can’t be initiated ahead of the gyro task being called, so there’s a performance hit. We can live without it, but it would certainly be better with.

@haslinghuis
Copy link
Member

@ot0tot

  • Like to merge this.
  • We are aware of limitations but this is board is already in production.
  • Limitations won't be a big deal for wings - but we would not accept this for new designs.
  • New designs will have to deal with new design requirements and standards we set.

@limonspb
Copy link
Member

limonspb commented Jan 5, 2025

@ot0tot @haslinghuis
i've tried to flash it, everything seems to be working. except SD card for blackbox (can't select SD card on blackbox tab).

i've tried to add:

#define SDCARD_DETECT_INVERTED
#define USE_SDCARD_SPI
#define SDCARD_SPI_INSTANCE SPI3

replaced #define SDCARD_CS_PIN PC14 with #define SDCARD_SPI_CS_PIN PC14

and removed #define FLASH_SPI_INSTANCE SPI3, #define USE_FLASH, #define USE_FLASH_W25Q128FV

Now i can at least select SD card on blackbox tab, but SD card shows fatal error, reboot to retry on bbx tab with CLI status: SD card: Startup failed (same SD card works on SPEEDEBEEF405V4 on BF and it works for SPEEDYBEEF405_WING target in Inav)

This is Inav target, looks like it's SPI3 and PC14 pin, so it should work unless i missed something:
https://github.com/iNavFlight/inav/tree/master/src/main/target/SPEEDYBEEF405WING

This is what i currently have:
config.h.txt

  • tried with SDCARD_DETECT_INVERTED and without - makes no difference.

@haslinghuis
Copy link
Member

haslinghuis commented Jan 5, 2025

  • The mini board does not seem to have flash, also updated SDC related defines with same results.
  • Do we need the SDCARD_DETECT_PIN ?

@limonspb
Copy link
Member

limonspb commented Jan 5, 2025

  • The mini board does not seem to have flash, also updated SDC related defines with same results.
  • Do we need the SDCARD_DETECT_PIN ?

MINI board also have SD card slot. And it fails to connect to it with the same error.
i thought SDCARD_DETECT_PIN is for auto detecting SD card and switch to FLASH if its not detected?
But i see some targets without FLASH still using it...

Copy link
Member

@limonspb limonspb left a comment

Choose a reason for hiding this comment

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

i think these suggestions are correct, but it still doesn't make SD card to work...

configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
@ot0tot
Copy link
Contributor Author

ot0tot commented Jan 6, 2025

Came across this issue: betaflight/betaflight#12958

@ot0tot
Copy link
Contributor Author

ot0tot commented Jan 6, 2025

SD card works in BF 4.2.11, but not in any later versions.

MCU F40X Clock=168MHz (PLLP-HSE), Vref=3.28V, Core temp=35degC
Stack size: 2048, Stack address: 0x1000fff0
Config size: 3960, Max available config: 16384
Gyros detected:

OSD: MAX7456
System Uptime: 29 seconds, Current Time: 2025-01-06T06:25:11.432+00:00
CPU:1%, cycle time: 0, GYRO rate: 0, RX rate: 33, System rate: 10
Voltage: 1 * 0.01V (0S battery - NOT PRESENT)
I2C Errors: 0
SD card: Manufacturer 0x9e, 3914752kB, 11/2016, v0.2, '     '
Filesystem: Ready
Arming disable flags: NOGYRO RXLOSS CLI MSP

image

Edit: Speedybee reports 4.3.1 works also, but 4.3.2 does not.
Edit2: Not working for me on 4.3.0 or 4.3.1.

@limonspb
Copy link
Member

limonspb commented Jan 7, 2025

this commit causing issues for this FC sdcard: 87c8847c13d7f759548c2384e400d2bc387b159a
so its this PR: betaflight/betaflight#10705

@haslinghuis haslinghuis marked this pull request as ready for review January 10, 2025 20:06
@limonspb
Copy link
Member

SD card issue resolved here by @SteveCEvans
betaflight/betaflight#14142

configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
configs/SPEEDYBEEF405WING/config.h Outdated Show resolved Hide resolved
ot0tot and others added 5 commits January 10, 2025 16:20
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
@ot0tot
Copy link
Contributor Author

ot0tot commented Jan 10, 2025

Since this FC lacks the gyro interrupt connection, should we include a line in the define to limit the PID loop rate to 4kHz or 2kHz?

#define DEFAULT_PID_PROCESS_DENOM 2

@limonspb
Copy link
Member

Since this FC lacks the gyro interrupt connection, should we include a line in the define to limit the PID loop rate to 4kHz or 2kHz?

#define DEFAULT_PID_PROCESS_DENOM 2

Let's limit with 4k first and see how that goes?

ot0tot and others added 2 commits January 11, 2025 13:09
@ot0tot
Copy link
Contributor Author

ot0tot commented Jan 11, 2025

I think this is good to go now. @limonspb reports tested and everything working properly.

Please review and merge when able.

@limonspb
Copy link
Member

I think this is good to go now. @limonspb reports tested and everything working properly.

Please review and merge when able.

Flies amazing! Thanks!

20250111_172433.mp4

@haslinghuis haslinghuis merged commit 2b536e3 into betaflight:master Jan 13, 2025
1 check passed
@ot0tot ot0tot deleted the Add-SPEEDYBEEF405WING branch January 13, 2025 21:42
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.

5 participants