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

BETF_BETAFPV411 incompatible with Serial ELRS FC v2.1 #13102

Open
hyp0dermik-code opened this issue Sep 30, 2023 · 34 comments
Open

BETF_BETAFPV411 incompatible with Serial ELRS FC v2.1 #13102

hyp0dermik-code opened this issue Sep 30, 2023 · 34 comments
Labels
BUG Bugs are excluded from automatically being marked as stale

Comments

@hyp0dermik-code
Copy link

hyp0dermik-code commented Sep 30, 2023

Describe the bug

Calib arm flag not cleared when reflashing from configurator - no output observed from gyro

To Reproduce

Reflash 4.4.0+ from configurator
Load custom defaults for board (unless 4.5z)
Enable bidir
Observe no output from gyro

Run

set dshot_bitbang = on
save

Observe gyro working

Expected behavior

Default config does not force bitbang off
https://github.com/betaflight/unified-targets/blob/db65066064791ce8c7d381666a7a9f67ce4efd1d/configs/default/BEFH-BETAFPVF411.config#L113

Support ID

``

Flight controller

BETF_BETAFPV411

Other components

BetaFPV Serial ELRS FC v2.1 (Meteor75 Pro)

How are the different components wired up (including port information)

No response

Add any other context about the problem that you think might be relevant here

No response

@hyp0dermik-code hyp0dermik-code added the Template: Bug Set by auto_close_issue. label Sep 30, 2023
@hyp0dermik-code
Copy link
Author

hyp0dermik-code commented Sep 30, 2023

Not working:
image

status
MCU F411 Clock=108MHz (PLLP-HSE), Vref=3.30V, Core temp=30degC
Stack size: 2048, Stack address: 0x2001fff0
Configuration: CONFIGURED, size: 3318, max available: 16384
Devices detected: SPI:1, I2C:0
Gyros detected: gyro 1 locked dma
GYRO=BMI270, ACC=BMI270
OSD: MAX7456 (30 x 13)
BUILD KEY: a70fcd089938ae62e83004e3c9939c08 (4.5.0-zulu)
System Uptime: 13 seconds, Current Time: 2023-09-30T03:08:01.099+00:00
CPU:20%, cycle time: 308, GYRO rate: 3246, RX rate: 15, System rate: 9
Voltage: 75 * 0.01V (0S battery - NOT PRESENT)
I2C Errors: 0
FLASH: JEDEC ID=0x00ef4017 8M
Arming disable flags: RXLOSS ANGLE CALIB CLI MSP RPMFILTER

# dma show

Currently active DMA:
--------------------
DMA1 Stream 0: MOTOR 3
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: MOTOR 4
DMA1 Stream 4: MOTOR 1
DMA1 Stream 5: MOTOR 2
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: SPI_SDI 1
DMA2 Stream 1: FREE
DMA2 Stream 2: FREE
DMA2 Stream 3: SPI_SDO 1
DMA2 Stream 4: ADC 1
DMA2 Stream 5: FREE
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE

@hyp0dermik-code
Copy link
Author

hyp0dermik-code commented Sep 30, 2023

Working:
image

# status
MCU F411 Clock=108MHz (PLLP-HSE), Vref=3.30V, Core temp=30degC
Stack size: 2048, Stack address: 0x2001fff0
Configuration: CONFIGURED, size: 3318, max available: 16384
Devices detected: SPI:1, I2C:0
Gyros detected: gyro 1 locked
GYRO=BMI270, ACC=BMI270
OSD: MAX7456 (30 x 13)
BUILD KEY: a70fcd089938ae62e83004e3c9939c08 (4.5.0-zulu)
System Uptime: 61 seconds, Current Time: 2023-09-30T10:24:07.998+00:00
CPU:45%, cycle time: 309, GYRO rate: 3236, RX rate: 15, System rate: 9
Voltage: 75 * 0.01V (0S battery - NOT PRESENT)
I2C Errors: 0
FLASH: JEDEC ID=0x00ef4017 8M
Arming disable flags: RXLOSS CLI MSP RPMFILTER

# dma show

Currently active DMA:
--------------------
DMA1 Stream 0: FREE
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: SPI_SDI 2
DMA1 Stream 4: SPI_SDO 2
DMA1 Stream 5: FREE
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: FREE
DMA2 Stream 1: DSHOT_BITBANG 2
DMA2 Stream 2: FREE
DMA2 Stream 3: FREE
DMA2 Stream 4: ADC 1
DMA2 Stream 5: FREE
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE
DMA2 Stream 7: FREE 

Factory diff/dump/dma
diff.txt
dma_timer.txt
dump.txt

@Noctaro
Copy link

Noctaro commented Sep 30, 2023

Output from V2.0 of the board
BetaFPV Serial ELRS FC v2.0 (Meteor75 Pro)

grafik

# status
MCU F411 Clock=108MHz (PLLP-HSE), Vref=3.31V, Core temp=46degC
Stack size: 2048, Stack address: 0x2001fff0
Configuration: CONFIGURED, size: 3318, max available: 16384
Devices detected: SPI:1, I2C:0
Gyros detected: gyro 1 locked dma
GYRO=BMI270, ACC=BMI270
OSD: MAX7456 (30 x 13)
BUILD KEY: e804d7b6b78b45de9b4a32f3f9622270 (4.5.0-zulu)
System Uptime: 100 seconds, Current Time: 2023-09-30T10:11:10.810+00:00
CPU:41%, cycle time: 308, GYRO rate: 3246, RX rate: 15, System rate: 9
Voltage: 217 * 0.01V (0S battery - NOT PRESENT)
I2C Errors: 0
FLASH: JEDEC ID=0x00ef4017 8M
Arming disable flags: RXLOSS CLI MSP RPMFILTER

# dma show

Currently active DMA:
--------------------
DMA1 Stream 0: MOTOR 3
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: MOTOR 4
DMA1 Stream 4: MOTOR 1
DMA1 Stream 5: MOTOR 2
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: SPI_SDI 1
DMA2 Stream 1: FREE
DMA2 Stream 2: FREE
DMA2 Stream 3: SPI_SDO 1
DMA2 Stream 4: ADC 1
DMA2 Stream 5: FREE
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE

# 

Factory diff/dump
diff_BTFL_cli_Meteor75_Pro_20230421_140307.txt
dump_BTFL_cli_Meteor75_Pro_20230421_140329.txt

@SteveCEvans
Copy link
Member

timer and timer show in the non-working case would be useful. Is bidirectional DSHOT on?

@SteveCEvans
Copy link
Member

It's working for me.

# version
# Betaflight / STM32F411 (S411) 4.5.0 Sep 30 2023 / 11:08:59 (26522a7a8) MSP API: 1.46
# config rev: 999c9ef
# board: manufacturer_id: BEFH, board_name: BETAFPVF411

# get dshot_bitbang
dshot_bitbang = OFF
Allowed values: OFF, ON, AUTO

dshot_bitbang_timer = AUTO
Allowed values: AUTO, TIM1, TIM8

# status
MCU F411 Clock=108MHz (PLLP-HSE), Vref=3.30V, Core temp=40degC
Stack size: 2048, Stack address: 0x2001fff0
Configuration: CONFIGURED, size: 3715, max available: 16384
Devices detected: SPI:1, I2C:0
Gyros detected: gyro 1 locked dma
GYRO=BMI270, ACC=BMI270
OSD: MSP (53 x 20)
BUILD KEY: 7faaf08f271b032953050181573e5481 (4.5.0-zulu)
System Uptime: 117 seconds, Current Time: 2023-09-30T17:19:39.537+00:00
CPU:39%, cycle time: 313, GYRO rate: 3194, RX rate: 15, System rate: 9
Voltage: 204 * 0.01V (0S battery - NOT PRESENT)
I2C Errors: 0
FLASH: JEDEC ID=0x00ef4017 8M
GPS: NOT ENABLED
Arming disable flags: RXLOSS CLI MSP RPMFILTER

# dma show

Currently active DMA:
--------------------
DMA1 Stream 0: MOTOR 3
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: MOTOR 4
DMA1 Stream 4: MOTOR 1
DMA1 Stream 5: MOTOR 2
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: SPI_SDI 1
DMA2 Stream 1: FREE
DMA2 Stream 2: FREE
DMA2 Stream 3: SPI_SDO 1
DMA2 Stream 4: ADC 1
DMA2 Stream 5: FREE
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE

# timer show

Currently active Timers:
-----------------------
TIM1: FREE
TIM2: FREE
TIM3:
    CH1 : MOTOR 1
    CH2 : MOTOR 2
TIM4:
    CH1 : MOTOR 3
    CH2 : MOTOR 4
TIM5: FREE
TIM6: FREE
TIM7: FREE
TIM9: FREE
TIM10: FREE
TIM11: FREE

image

@Noctaro
Copy link

Noctaro commented Sep 30, 2023

@SteveCEvans is this rev 2.0 of the board?
Rev 2.0 also works for me. 2.1 seems to have trouble.

@hyp0dermik-code
Copy link
Author

hyp0dermik-code commented Oct 1, 2023

timer and timer show in the non-working case would be useful. Is bidirectional DSHOT on?
with dshot_bitbang = off as per default config:

# timer show

Currently active Timers:
-----------------------
TIM1: FREE
TIM2: FREE
TIM3:
    CH1 : MOTOR 1
    CH2 : MOTOR 2
TIM4:
    CH1 : MOTOR 3
    CH2 : MOTOR 4
TIM5: FREE
TIM6: FREE
TIM7: FREE
TIM9: FREE
TIM10: FREE
TIM11: FREE
# dshot_telemetry_info
Dshot reads: 1166073
Dshot invalid pkts: 4
Dshot directionChange cycles: 316, micros: 2

Motor    Type   eRPM    RPM     Hz Invalid   TEMP    VCC   CURR  ST/EV   DBG1   DBG2   DBG3
=====  ====== ====== ====== ====== ======= ====== ====== ====== ====== ====== ====== ======
    1   R----      0      0      0   0.00%      0   0.00      0      0      0      0      0
    2   R----      0      0      0   0.00%      0   0.00      0      0      0      0      0
    3   R----      0      0      0   0.00%      0   0.00      0      0      0      0      0
    4   R----      0      0      0   0.00%      0   0.00      0      0      0      0      0

7 7 7 7 7 7 7 14 14 7 14 14 7 14 7 14 0 0 0 0 0 0 
0 0 0 0 0 0 7 0 4294967289 7 0 4294967289 7 4294967289 7 4294967282 0 0 0 0 0 

confirming gyro still not working
image

@hyp0dermik-code
Copy link
Author

hyp0dermik-code commented Oct 1, 2023

OSD and blackbox work with working config.I have not tested OSD or blackbox with bitbang off.
Voltage works
Current sensor constantly reports ~12a with bitbang on or off.
The pin does not seem to have changed:
factory config - resource ADC_CURR 1 B01
4.5 dump - resource ADC_CURR 1 B01

@SteveCEvans
Copy link
Member

Flash and OSD are both on SPI bus 2 which isn’t good for higher logging rates.

@SteveCEvans
Copy link
Member

@SteveCEvans is this rev 2.0 of the board?
Rev 2.0 also works for me. 2.1 seemst to have trouble.

Not sure to be honest. Mine is in an early Meteor75 HD (WS). I’ll look to see if a rev is visible on the silk-screen.

@hyp0dermik-code
Copy link
Author

hyp0dermik-code commented Oct 1, 2023

@SteveCEvans is this rev 2.0 of the board?
Rev 2.0 also works for me. 2.1 seemst to have trouble.

Not sure to be honest. Mine is in an early Meteor75 HD (WS). I’ll look to see if a rev is visible on the silk-screen.

The rev on mine is in between motor ports. Should be visible without disassembly from the bottom.

@SteveCEvans
Copy link
Member

Yup, found it. V2.0.

Copy link

github-actions bot commented Nov 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@github-actions github-actions bot added the Inactive Automatically detected and labeled, will be closed after another week of inactivity. label Nov 1, 2023
@hyp0dermik-code
Copy link
Author

Still needs further investigation, simple solution would be set bitbang on/auto in config.h, but these issues suggest that this will cause problems for other users with the older version?
#10819 (comment)
#12173

@haslinghuis haslinghuis added BUG Bugs are excluded from automatically being marked as stale and removed Inactive Automatically detected and labeled, will be closed after another week of inactivity. Template: Bug Set by auto_close_issue. labels Nov 2, 2023
@gizlonk
Copy link

gizlonk commented Dec 7, 2023

I also have the V2.1, and my acellerometer went wild after upgrading to 4.4.3.

Using the instructions above, I was able to get it working:

  1. Flash 4.4.3
  2. Enable BiDir and "save and reboot"
  3. Reconnect and run "set dshot_bitbang = on" in the cli tab
  4. "save" in the cli tab
  5. Calibrate acellerometer
  6. Configure gyro alignment (mine was 90 degrees CW)

@haslinghuis
Copy link
Member

@hyp0dermik-code should we change the default for dshot_bitbang for this target?

@ot0tot
Copy link
Contributor

ot0tot commented Dec 7, 2023

Seems to be an issue with losing DMA on SPI2 (used for blackbox and OSD) when DShot bitbang is disabled. Just a poor choice of motor resource pins complicated by having multiple peripherals on the same SPI bus.

@hyp0dermik-code If you disable blackbox, does everything else work properly with dshot_bitbang off?

The downside of defaulting to dshot_bitbang on is you lose DMA on the gyro. This doesn't seem to be a huge issue with the BMI270 gyro due to it's low sample rate, but would cause issues with FCs that use this target that have the MPU6000 gyro.

@hyp0dermik-code
Copy link
Author

hyp0dermik-code commented Dec 8, 2023

@hyp0dermik-code should we change the default for dshot_bitbang for this target?

Not yet, this fix only seems to be relevant for v2.1 with no cause found yet. Per here it may break things #13102 (comment) and will break existing users diffs for this target?

Seems to be an issue with losing DMA on SPI2 (used for blackbox and OSD) when DShot bitbang is disabled. Just a poor choice of motor resource pins complicated by having multiple peripherals on the same SPI bus.

Will check

@MJ666
Copy link
Contributor

MJ666 commented Dec 8, 2023

I have an BetaFPV 1-2S F4 Pro V2.1 ELRS FC with an ICM20689 gyro in a Beta85 Pro drone. Had a few flights with 4.4.3 and 250Hz last week without any issues.

@haslinghuis
Copy link
Member

Had no issues with Meteor 85 either (ICM20689 using a development version with added blackbox from betafpv).

@Prajwal-Koirala

This comment has been minimized.

@alexberdnik
Copy link

Same issue for me, ELRS FC with BMI270, no ceramic antenna. dshot_bitbang is required and gyro aligment should be set to 90CW.

@MWTaken
Copy link

MWTaken commented Jan 18, 2024

Using ELRS 2.1 and 4.4.3, enabled bitbang made the gyro work again, however if I also enable LEDs in configuration i get the below error.
Screenshot 2024-01-18 161224

@haslinghuis
Copy link
Member

If using the SPI ELRS FC you would need BEFH-BETAFPVF4SX1280 instead of BEFH-BETAFPVF411.

BEFH-BETAFPVF4SX1280 does not have blackbox as BEFH-BETAFPVF411 does.

Please submit support ID here for more information. You can create one in the CLI tab.

@MWTaken
Copy link

MWTaken commented Jan 22, 2024

If using the SPI ELRS FC you would need BEFH-BETAFPVF4SX1280 instead of BEFH-BETAFPVF411.

BEFH-BETAFPVF4SX1280 does not have blackbox as BEFH-BETAFPVF411 does.

Please submit support ID here for more information. You can create one in the CLI tab.

its the serial elrs version.

So looking at the 4.3 build bitbang is on by default. I can't see any way to make this FC work with addressable LEDs since it needs bitbang to work.

@demvlad
Copy link

demvlad commented Mar 29, 2024

Hello!
I have this issue on BetaFPV F4 5A AIO intergrated serial ELRS.
No arm with CALBRATING reasone. There are no Gyro output on sensor tab.
Betaflight 4.5RC3.
I've checked, the BF 4.4 does not work too.
Is exists any way to do this FC work?

@demvlad
Copy link

demvlad commented Mar 29, 2024

Hello! I have this issue on BetaFPV F4 5A AIO intergrated serial ELRS. No arm with CALBRATING reasone. There are no Gyro output on sensor tab. Betaflight 4.5RC3. I've checked, the BF 4.4 does not work too. Is exists any way to do this FC work?

It seems, the dshot_bitbang=on is realy helpfull!

@MWTaken
Copy link

MWTaken commented Mar 29, 2024

Led outputs won’t work with bitbang on, don’t bother trying to solder on addressable leds.

@haslinghuis
Copy link
Member

Try disabling blackbox for led outputs to work.

@demvlad
Copy link

demvlad commented Mar 29, 2024

Ok. Thank you.
I've disabled LED when flash BF firmware.
But i need blackbox very much:).
Will the blackbox work without LED?

@demvlad
Copy link

demvlad commented Mar 29, 2024

There are no other limits by using bit_bang=On ?

@demvlad
Copy link

demvlad commented Apr 2, 2024

I've got an answer from BetaFPV support. They written that this is some firmware issue.

@Justicefpv
Copy link

Justicefpv commented May 1, 2024

Below is from my Discord support forum post. I've run into this issue recently, as it seems many others have.

I recently replaced two BETAFPVF411 1s AIO's, both are of the same 2.1 revision. However, I have encountered an issue with the gyro calibration/initialization process.

Upon setting up and testing the flight controllers, I found that the FCs fail to calibrate properly during the initialization process after plugging in the USB cable. (Setting the gyro_calib_noise_limit has no effect) The arming flag within the configurator is stuck at 'calibrating', the model does not move on the setup tab and the sensors tab also shows no movement.

I have attempted various troubleshooting steps and the only way in which I can get both FCs to work correctly is to set both dshot_bitbang to ON and acc_calibration to a value I found in the dump file on the betafpv website within the CLI. By doing this the configurator will then report the gyro correctly.

I found that the two FCs also behave differently when it comes to the dshot_bitbang setting. One unit works correctly with this setting turned OFF, while the other unit only functions properly when dshot_bitbang is set to ON. This behaviour is surprising since both units are supposed to be identical (2.1 revision).

@krisdover
Copy link

krisdover commented May 10, 2024

Same issue for me, ELRS FC with BMI270, no ceramic antenna. dshot_bitbang is required and gyro alignment should be set to 90CW.

Same here running BF v4.4.3. The FC is a v2.1 betafpv411 AIO board with the serial ELRS receiver. For some strange reason the Gyro update frequency is also stuck on 3.20 KHz. Any ideas as to how to get 8 KHz?

EDIT: I just realised this AIO runs the BMI270 which is limited to 3.2 KHz 😳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Bugs are excluded from automatically being marked as stale
Projects
None yet
Development

No branches or pull requests