mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-01 22:38:19 +00:00
56 lines
2.6 KiB
Plaintext
56 lines
2.6 KiB
Plaintext
# nRF52 Platform Configuration
|
|
# Included by all nRF52-based boards (RAK4631, Wio Tracker, T1000-E, Ikoka Nano, etc.)
|
|
# Only contains nRF52-specific settings — common BLE/Storage/Input is in zephcore_common.conf
|
|
#
|
|
# Include order: prj.conf → zephcore_common.conf → nrf52_common.conf → <board>/board.conf
|
|
|
|
# ========== Build Output (nRF52 specific) ==========
|
|
CONFIG_BUILD_OUTPUT_UF2=y
|
|
CONFIG_USE_DT_CODE_PARTITION=y
|
|
|
|
# ========== USB CDC ACM (nRF52 USB) ==========
|
|
# We own usbd init via adapters/usb/ZephyrUSBCDC.cpp so the same
|
|
# usbd_msg_callback can handle 1200-baud DFU detection and signal DTR
|
|
# transitions to the boot-waiter event + companion disconnect callback.
|
|
# Without =n here the Zephyr sample-style auto-init runs at SYS_INIT
|
|
# with no public hook for us.
|
|
CONFIG_USB_DEVICE_STACK_NEXT=y
|
|
CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=n
|
|
CONFIG_UART_LINE_CTRL=y
|
|
|
|
# ========== BLE: nRF52-specific controller settings ==========
|
|
# TX power: +4 dBm (Zephyr open-source BLE controller)
|
|
CONFIG_BT_CTLR_TX_PWR_PLUS_4=y
|
|
|
|
# Data Length Extension — controller-side max (host-side in zephcore_common.conf)
|
|
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
|
|
|
|
# Coded PHY — enable in nRF LL controller (host auto-request in zephcore_common.conf)
|
|
CONFIG_BT_CTLR_PHY_CODED=y
|
|
|
|
# ========== Flash: nRF52-specific ==========
|
|
# Partial erase — splits 4KB page erase into small sub-erases that fit
|
|
# between BLE connection events. Without this, the flash driver waits for
|
|
# an ~85ms gap in BLE activity (ticker sync) which never comes during an
|
|
# active connection, freezing the system on the first flash write.
|
|
CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y
|
|
|
|
# QSPI flash — auto-detected from devicetree. Boards with a nordic,qspi-nor
|
|
# node get the driver automatically (Zephyr default y when DT node exists).
|
|
# Boards without QSPI in DTS stay disabled — no override needed either way.
|
|
#
|
|
# Page size: 4096 (sector erase) instead of Zephyr default 65536 (block erase).
|
|
# LittleFS works much better with 4KB erase granularity on small partitions.
|
|
# Silently ignored when QSPI is not present (Kconfig guard: if NORDIC_QSPI_NOR).
|
|
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
|
|
|
|
# ========== Debug ==========
|
|
# SEGGER RTT and CONFIG_ASSERT are debug-only and live in boards/common/debug.conf
|
|
# (opt-in). Keeping them here would override the production defaults from
|
|
# prj.conf (CONFIG_USE_SEGGER_RTT=n, CONFIG_ASSERT=n) on every nRF52 build,
|
|
# since this file loads after prj.conf.
|
|
#
|
|
# BT_CTLR_ASSERT_HANDLER is harmless when CONFIG_ASSERT=n (no RAM/flash cost,
|
|
# the handler is simply never invoked) so it stays on for both prod and debug.
|
|
CONFIG_BT_CTLR_ASSERT_HANDLER=y
|