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

Latest master not working #12370

Closed
TheIsotopes opened this issue Feb 15, 2023 · 7 comments · Fixed by #12373
Closed

Latest master not working #12370

TheIsotopes opened this issue Feb 15, 2023 · 7 comments · Fixed by #12373
Labels
BUG Bugs are excluded from automatically being marked as stale

Comments

@TheIsotopes
Copy link
Contributor

TheIsotopes commented Feb 15, 2023

Describe the bug

I'm tested now the latest master but i'm not happy. I checked back and found the culprit.

since #12355 the following problems have occurred

  • cpu load has increased by about 20%
  • led strip flashes confused
  • motors are not initialized
  • rpmfilter not working

here any screenshots:

Screenshot_20230215_130733
Screenshot_20230215_130754

@blckmn pls can you check this

To Reproduce

using latest master

Expected behavior

working fc

Support ID

*** Support data submitted *** 
Id: "e27ef9ea-1e52-40e8-ab38-1cf082393389"

Flight controller

MATEKF722MINI

Other components

No response

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

@TheIsotopes TheIsotopes added the Template: Bug Set by auto_close_issue. label Feb 15, 2023
@haslinghuis haslinghuis added BUG Bugs are excluded from automatically being marked as stale and removed Template: Bug Set by auto_close_issue. labels Feb 15, 2023
@haslinghuis
Copy link
Member

I suspect #12349 - @TheIsotopes did you check that PR too or other PR's before that?

@TheIsotopes
Copy link
Contributor Author

TheIsotopes commented Feb 15, 2023

@haslinghuis I'm just testing again.
It only seems to affect F722 and H743, on my F405 everything seems fine.

edit: build's with #12349 working fine ... but of course it could also be because of this and #12355 is just the trigger.
imo it seems to be a timer problem!?

@haslinghuis
Copy link
Member

haslinghuis commented Feb 15, 2023

Curious about the timer (and dma) assignment between last working version and failing version (and maybe also compare tasks output)

@TheIsotopes
Copy link
Contributor Author

TheIsotopes commented Feb 15, 2023

Here i have the outputs of resource show all and tasks to compare.
with the resources so far everything is in order, only two new entrys from i2c on B10/B11.
When comparing tasks, PID stands out from the role.

here outputs from last working version:

# version
# Betaflight / STM32F7X2 (S7X2) 4.5.0 Feb 15 2023 / 20:32:52 (2dbbd1882) MSP API: 1.45

# config: YES
# board: manufacturer_id: MTKS, board_name: MATEKF722MINI

# resource show all
Currently active IO resource assignments:
(reboot to update)
--------------------
A00: FREE
A01: FREE
A02: SERIAL_TX 2
A03: FREE
A04: FREE
A05: SPI_SCK 1
A06: SPI_MISO 1
A07: SPI_MOSI 1
A08: LED_STRIP
A09: FREE
A10: SERIAL_RX 1
A11: USB
A12: USB
A13: LED 2
A14: LED 1
A15: FREE
B00: MOTOR 3
B01: MOTOR 4
B02: GYRO_CS 1
B03: FREE
B04: MOTOR 1
B05: MOTOR 2
B06: FREE
B07: FREE
B08: I2C_SCL 1
B09: I2C_SDA 1
B10: FREE
B11: FREE
B12: FREE
B13: SPI_SCK 2
B14: SPI_MISO 2
B15: SPI_MOSI 2
C00: FREE
C01: ADC_CURR
C02: ADC_BATT
C03: FREE
C04: GYRO_EXTI
C05: FREE
C06: FREE
C07: FREE
C08: PINIO 1
C09: PINIO 2
C10: SPI_SCK 3
C11: SPI_MISO 3
C12: SPI_MOSI 3
C13: BEEPER
C14: FREE
C15: GYRO_CS 2
D00: FREE
D01: FREE
D02: FLASH_CS
D03: FREE
D04: FREE
D05: FREE
D06: FREE
D07: FREE
D08: FREE
D09: FREE
D10: FREE
D11: FREE
D12: FREE
D13: FREE
D14: FREE
D15: FREE
E00: FREE
E01: FREE
E02: FREE
E03: FREE
E04: FREE
E05: FREE
E06: FREE
E07: FREE
E08: FREE
E09: FREE
E10: FREE
E11: FREE
E12: FREE
E13: FREE
E14: FREE
E15: FREE
F00: FREE
F01: FREE
F02: FREE
F03: FREE
F04: FREE
F05: FREE
F06: FREE
F07: FREE
F08: FREE
F09: FREE
F10: FREE
F11: FREE
F12: FREE
F13: FREE
F14: FREE
F15: FREE

Currently active Timers:
-----------------------
TIM1:
    CH1 : LED_STRIP
TIM2: FREE
TIM3: FREE
TIM4: FREE
TIM5: FREE
TIM6: FREE
TIM7: FREE
TIM8:
    CH1 : DSHOT_BITBANG 2
TIM9: FREE
TIM10: FREE
TIM11: FREE
TIM12: FREE
TIM13: FREE
TIM14: FREE

Currently active DMA:
--------------------
DMA1 Stream 0: SPI_MISO 3
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: FREE
DMA1 Stream 4: FREE
DMA1 Stream 5: SPI_MOSI 3
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: SPI_MISO 1
DMA2 Stream 1: FREE
DMA2 Stream 2: DSHOT_BITBANG 2
DMA2 Stream 3: LED_STRIP
DMA2 Stream 4: ADC
DMA2 Stream 5: SPI_MOSI 1
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE

# tasks
Task list             rate/hz  max/us  avg/us maxload avgload  total/ms   late    run reqd/us
00 - (         SYSTEM)     10       6       0    0.0%    0.0%         0      5    850       3
01 - (         SYSTEM)    996       8       0    0.7%    0.0%        40     91  84451       3
02 - (           GYRO)   8013       9       1    7.2%    1.4%      1205      0 681204       0
03 - (         FILTER)   8013      27      14   21.6%   11.7%      9808      0 681204       0
04 - (            PID)   8013      80      44   64.1%   35.9%     31247      0 681204       0
07 - (             RX)     10      28      14    0.0%    0.0%        36     10   2550      17
08 - (         SERIAL)    100    9420       1   94.2%    0.0%        32      0   8454       5
09 - (       DISPATCH)    995       7       0    0.6%    0.0%        60     73  84450       2
10 - (BATTERY_VOLTAGE)     50       7       2    0.0%    0.0%         8      0   4241       5
11 - (BATTERY_CURRENT)     50      10       3    0.0%    0.0%        11      1   4240       6
12 - ( BATTERY_ALERTS)      5       9       4    0.0%    0.0%         1      1    426       7
13 - (         BEEPER)    100       8       0    0.0%    0.0%         8      8   8454       5
18 - (      TELEMETRY)    249      22       0    0.5%    0.0%        29     23  21142       0
19 - (       LEDSTRIP)     99      54       8    0.5%    0.0%        59      1   8322      44
21 - (        VTXCTRL)      5       5       0    0.0%    0.0%         0      1    425       4
23 - (    ADCINTERNAL)      1       8       4    0.0%    0.0%         0      1     86       7
RX Check Function                   6       1                         1
Total (excluding SERIAL)                                49.0%

and here from latest master:

# version
# Betaflight / STM32F7X2 (S7X2) 4.5.0 Feb 15 2023 / 08:08:54 (3faf84401) MSP API: 1.45

# config: YES
# board: manufacturer_id: MTKS, board_name: MATEKF722MINI

# resource show all
Currently active IO resource assignments:
(reboot to update)
--------------------
A00: FREE
A01: FREE
A02: SERIAL_TX 2
A03: FREE
A04: FREE
A05: SPI_SCK 1
A06: SPI_MISO 1
A07: SPI_MOSI 1
A08: LED_STRIP
A09: FREE
A10: SERIAL_RX 1
A11: USB
A12: USB
A13: LED 2
A14: LED 1
A15: FREE
B00: MOTOR 3
B01: MOTOR 4
B02: GYRO_CS 1
B03: FREE
B04: MOTOR 1
B05: MOTOR 2
B06: FREE
B07: FREE
B08: I2C_SCL 1
B09: I2C_SDA 1
B10: I2C_SCL 2
B11: I2C_SDA 2
B12: FREE
B13: SPI_SCK 2
B14: SPI_MISO 2
B15: SPI_MOSI 2
C00: FREE
C01: ADC_CURR
C02: ADC_BATT
C03: FREE
C04: GYRO_EXTI
C05: FREE
C06: FREE
C07: FREE
C08: PINIO 1
C09: PINIO 2
C10: SPI_SCK 3
C11: SPI_MISO 3
C12: SPI_MOSI 3
C13: BEEPER
C14: FREE
C15: GYRO_CS 2
D00: FREE
D01: FREE
D02: FLASH_CS
D03: FREE
D04: FREE
D05: FREE
D06: FREE
D07: FREE
D08: FREE
D09: FREE
D10: FREE
D11: FREE
D12: FREE
D13: FREE
D14: FREE
D15: FREE
E00: FREE
E01: FREE
E02: FREE
E03: FREE
E04: FREE
E05: FREE
E06: FREE
E07: FREE
E08: FREE
E09: FREE
E10: FREE
E11: FREE
E12: FREE
E13: FREE
E14: FREE
E15: FREE
F00: FREE
F01: FREE
F02: FREE
F03: FREE
F04: FREE
F05: FREE
F06: FREE
F07: FREE
F08: FREE
F09: FREE
F10: FREE
F11: FREE
F12: FREE
F13: FREE
F14: FREE
F15: FREE

Currently active Timers:
-----------------------
TIM1:
    CH1 : LED_STRIP
TIM2: FREE
TIM3: FREE
TIM4: FREE
TIM5: FREE
TIM6: FREE
TIM7: FREE
TIM8:
    CH1 : DSHOT_BITBANG 2
TIM9: FREE
TIM10: FREE
TIM11: FREE
TIM12: FREE
TIM13: FREE
TIM14: FREE

Currently active DMA:
--------------------
DMA1 Stream 0: SPI_MISO 3
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: FREE
DMA1 Stream 4: FREE
DMA1 Stream 5: SPI_MOSI 3
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: SPI_MISO 1
DMA2 Stream 1: FREE
DMA2 Stream 2: DSHOT_BITBANG 2
DMA2 Stream 3: LED_STRIP
DMA2 Stream 4: ADC
DMA2 Stream 5: SPI_MOSI 1
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE

# tasks
Task list             rate/hz  max/us  avg/us maxload avgload  total/ms   late    run reqd/us
00 - (         SYSTEM)     10      16       0    0.0%    0.0%         0      1    233      14
01 - (         SYSTEM)    974      19       0    1.8%    0.0%        14     60  22642      14
02 - (           GYRO)   8013      19       4   15.2%    3.2%       703      0 186335       0
03 - (         FILTER)   8013      32      19   25.6%   15.2%      3550      0 186335       0
04 - (            PID)   8013      90      61   72.1%   49.1%     11111      0 186335       0
07 - (             RX)     10      32      14    0.0%    0.0%         9      8    699      29
08 - (         SERIAL)     99    2787       2   27.5%    0.0%        11      0   2268      17
09 - (       DISPATCH)    958      19       0    1.8%    0.0%        17     35  22653      16
10 - (BATTERY_VOLTAGE)     50      19       2    0.0%    0.0%         2      1   1158      17
11 - (BATTERY_CURRENT)     50      19       2    0.0%    0.0%         2      2   1158      17
12 - ( BATTERY_ALERTS)      5       4       2    0.0%    0.0%         0      0    117       3
13 - (         BEEPER)     99      18       1    0.1%    0.0%         2      5   2268      15
18 - (      TELEMETRY)    247      39       0    0.9%    0.0%        10     28   5596      10
19 - (       LEDSTRIP)     83      53       5    0.4%    0.0%        13     38   2041      42
21 - (        VTXCTRL)      5       2       0    0.0%    0.0%         0      0    117       1
23 - (    ADCINTERNAL)      1       5       3    0.0%    0.0%         0      0     24       4
RX Check Function                  18       1                         1
Total (excluding SERIAL)                                67.5%

@haslinghuis
Copy link
Member

haslinghuis commented Feb 15, 2023

edit: build's with #12349 working fine ... but of course it could also be because of this and #12355 is just the trigger.
imo it seems to be a timer problem!?

Nothing is missing. Added I2C2 resources and higher FILTER and PID utilization. Not sure why this should affect RPMFILTER.

image

Values are fluctuating. With #12349 error is 0.

@blckmn please check.

@blckmn
Copy link
Member

blckmn commented Feb 15, 2023

PR coming up. I think I have found the issue.

@blckmn
Copy link
Member

blckmn commented Feb 15, 2023

#12373

@haslinghuis haslinghuis linked a pull request Feb 15, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants