betaflight / config

Betaflight target definitions
GNU General Public License v3.0
24 stars 85 forks source link

CLNE/FREEAXISF4: no RGB LED #440

Closed sixtyfive closed 1 month ago

sixtyfive commented 1 month ago

Recently I stubbornly bought another one of these FreeAxis F4 25A AIOs since I liked the old one that ended up in the ocean. I still remember it was a little difficult to figure out, and to make things worse, this one came unflashed.

Currently I'm tinkering with the new one to get all peripherals back to work. So far I have

confirmed working.

Unfortunately the RGB LED is proving a little more difficult.

According to the BF target created last year, it should be on A08. This also coincides with the below pinout someone made for another F411 FC. Using the continuity tester verifies all the red markings (except Sx, I didn't test those) to be true for the FreeAxis board, as well. But so far, the LED is not responding.

STM32F411 pinout

Is it possible I'm missing something very basic?

My resources:

# resource
resource BEEPER 1 B02
resource MOTOR 1 B04
resource MOTOR 2 B05
resource MOTOR 3 B06
resource MOTOR 4 B07
resource LED_STRIP 1 A08
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 A02
resource SERIAL_RX 1 A10
resource SERIAL_RX 2 A03
resource SOFTSERIAL_TX 1 A00
resource SOFTSERIAL_RX 1 A00
resource I2C_SCL 1 B08
resource I2C_SDA 1 B09
resource LED 1 C13
resource LED 2 C14
resource SPI_SCK 1 A05
resource SPI_SCK 2 B13
resource SPI_SDI 1 A06
resource SPI_SDI 2 B14
resource SPI_SDO 1 A07
resource SPI_SDO 2 B15
resource ADC_BATT 1 B00
resource ADC_CURR 1 B01
resource FLASH_CS 1 A15
resource OSD_CS 1 B12
resource GYRO_EXTI 1 A01
resource GYRO_CS 1 A04
resource USB_DETECT 1 C15

Timers:

# timer
timer A03 AF3
# pin A03: TIM9 CH2 (AF3)
timer B04 AF2
# pin B04: TIM3 CH1 (AF2)
timer B05 AF2
# pin B05: TIM3 CH2 (AF2)
timer B06 AF2
# pin B06: TIM4 CH1 (AF2)
timer B07 AF2
# pin B07: TIM4 CH2 (AF2)
timer B03 AF1
# pin B03: TIM2 CH2 (AF1)
timer B10 AF1
# pin B10: TIM2 CH3 (AF1)
timer A00 AF2
# pin A00: TIM5 CH1 (AF2)
timer A02 AF2
# pin A02: TIM5 CH3 (AF2)
timer A08 AF1
# pin A08: TIM1 CH1 (AF1)

And DMA pins:

# dma
dma ADC 1 1
# ADC 1: DMA2 Stream 4 Channel 0
dma pin B04 0
# pin B04: DMA1 Stream 4 Channel 5
dma pin B05 0
# pin B05: DMA1 Stream 5 Channel 5
dma pin B06 0
# pin B06: DMA1 Stream 0 Channel 2
dma pin B07 0
# pin B07: DMA1 Stream 3 Channel 2
dma pin B03 0
# pin B03: DMA1 Stream 6 Channel 3
dma pin B10 0
# pin B10: DMA1 Stream 1 Channel 3
dma pin A00 0
# pin A00: DMA1 Stream 2 Channel 6
dma pin A02 0
# pin A02: DMA1 Stream 0 Channel 6
dma pin A08 0
# pin A08: DMA2 Stream 6 Channel 0
nerdCopter commented 1 month ago

i.e. troubleshooting if this is a build issue, or hardware defines issue. (i'm not personally knowledgeable on many of the define addressing/pins)

sixtyfive commented 1 month ago

Yes, USE_LED_STRIP, was included. I'm happy to test a core-only build, but was under the impression that that wouldn't have LED strip support.

Will post build logs once I'm back home.

nerdCopter commented 1 month ago

[...] was under the impression that that wouldn't have LED strip support.

i had to test myself, seems it is included. image

sixtyfive commented 1 month ago

Okay, so this is a little weird. On the core-only build, A08 is already taken by LED 1. So after I do resource LED 1 none; save, then resource LED_STRIP 1 A08; save, it's back to LED 1 A08.

Back to fresh cloud build, where it already has resource LED_STRIP 1 A08 out of the box. Didn't change anything else for now, only set up 1 single LED. This is what that should look like, right?

image

Cloud build log: https://gist.github.com/sixtyfive/2f7b5cc1441312bc755d55277aeaafa2

sixtyfive commented 1 month ago

Today, tried soldering a NeoPixel to the LED pin thinking perhaps the builtin RGB LED is bust. But still no light. Tried soldering the NeoPixel to the SmartAudio pin instead and reconfiguring resources to use A00 for LED_STRIP. Still nothing. I'm mildly convinced now that it is not a hardware thing but something with the build.

I also tried with the MATEKF411 build from which the FREEAXISF4 build was derived. It, too, has the built-in RGB LED on A08. The result is the same, though.

nerdCopter commented 1 month ago

i don't know enough about LED_STRIP versus/and onboard LEDs. someone else will have to review.

sixtyfive commented 1 month ago

@nerdCopter the riddle is solved: it turns out, once you actually power the LED, lo and behold, the LED will light up... 🤦‍♂️

Anyhow, that only leaves for all the #defines to be correct. I think I might be able to figure that out and then PR it. Closing this, and thank you for your patience and help!