Skip to content

feat(board): add Freenove FNK0104AB support - #3073

Open
chinderdelis wants to merge 1 commit into
BruceDevices:devfrom
chinderdelis:freenove-fnk0104b-board
Open

chinderdelis wants to merge 1 commit into
BruceDevices:devfrom
chinderdelis:freenove-fnk0104b-board

Conversation

@chinderdelis

Copy link
Copy Markdown

Proposed Changes

Fix and complete the existing Freenove FNK0104AB board support. All changes were validated on hardware (ESP32-S3 N16R8, 2.8" ILI9341 + FT6336G, ES8311 + FM8002E, SDMMC, WS2812).

  • Freenove-FNK0104AB.ini: RGB LED is on GPIO42 (GPIO40 is SD CMD); battery divider is on GPIO9 (not 8); enable 4-bit SDMMC.
  • interface.cpp: add D1/D2/D3 SD pins; mark the touch/codec I2C bus as sys_i2c so bus_HAL does not Wire.end() it and the wedged-bus recovery works; call setSysI2CBus() before touch init; attach the backlight PWM once in _pre_storage_gpio(); actually extinguish the backlight and send DISPOFF in powerOff().
  • sd_functions.cpp: make 4-bit SDMMC opt-in per board via SD_MMC_4BIT (1-bit remains the default for every other board).
  • touch.cpp: do not call touch.reset() for FT6X36 on every read (it toggles the hardware RST pin, making drags slow and occasionally wedging the controller).
  • settings.cpp: clamp brightness to >=1 (a saved 0 leaves the screen dark with no visible UI to raise it) and disable the body touch zone while the brightness menu is open.
  • .github/workflows/PR_check.yml: build the board in PR CI.

Verification

Tested on the device:

  • boot, display, touch, SD card (4-bit), battery ADC (GPIO9), RGB LED (GPIO42)
  • audio out (ES8311 + FM8002E), microphone
  • WiFi AP + WebUI + File Manager
  • BLE iBeacon advertising
  • deep sleep / poweroff with BOOT wake
  • Brightness menu and config saving (together with the separate config-dump fix)

Builds: Freenove FNK0104AB, plus ES3C28P as a regression check for the shared sd_functions.cpp / touch.cpp / settings.cpp changes.

Testing

Hardware tested on Freenove FNK0104AB; compile-tested on ES3C28P.

Linked Issues

N/A

User-Facing Change

Freenove FNK0104AB: fix RGB LED, battery ADC, 4-bit SD card, touch and backlight/poweroff.

Further Comments

HID/BadUSB and BLE keyboard were not tested (they require USB re-enumeration/pairing and can drop the serial console). External CC1101/NRF24 modules conflict with the broken-out pins (CC1101 io0=2 = MISO, NRF24 io0=3 = MOSI); documented in connections.md.

Hardware-validated fixes: RGB LED on GPIO42 (40 is SD CMD), battery divider on GPIO9, 4-bit SDMMC (opt-in via SD_MMC_4BIT), shared touch/codec I2C marked as sys_i2c, single LEDC backlight attach, real backlight off in powerOff(), no FT6X36 reset on every read, brightness clamped to >=1, and the board added to PR_check CI.

This branch has not been deployed

No deployments
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.

1 participant