Skip to content

Start device drivers under RTOS and enable RTC - #131

Merged
JohnAmadis merged 2 commits into
masterfrom
feat/stm32-rtc
Oct 16, 2026
Merged

JohnAmadis merged 2 commits into
masterfrom
feat/stm32-rtc

Conversation

@JaxCalder

@JaxCalder JaxCalder commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Device creation ran before dmosi_init started the scheduler, so a driver waiting for hardware through a semaphore could not initialize during boot. Queue a kernel boot task, start the scheduler, then mount filesystems/create devices, process startup modules and launch the main application in that task. The worker stack is reclaimed when it returns; the kernel owns its retained handle until scheduler shutdown.

Enable dmrtc with the board LSE preset, generic rtc console tool and test_dmrtc. The driver uses RCC IRQ plus an ISR-safe semaphore for oscillator readiness, with sleeping short waits for flags that have no IRQ. There is no busy-wait fallback.

Validation on STM32F746G-DISCO: flashed with Verified OK; latest RTC suite 11/11, dmdrvi diagnostic 6/6 and RNG regression 6/6. /dev devices and DHCP remain available. Starting with LSE disabled (BDCR=0x8100) confirmed a real RCC IRQ wake in the ST-Link log ring. Calendar rollover, year 2000 and powered reset retention are covered by the driver's validation report. The latest generic ioctl/CLI test transcript is linked in choco-technologies/dmrtc#1.

Integration requires releases of choco-technologies/dmdrvi#29 (RTC header), choco-technologies/dmdevfs#72 (r+b access mapping), then choco-technologies/dmrtc#1 and registration choco-technologies/dmod-registry#16. Local unpublished packages were used for hardware validation; no local paths or dependency version pins are committed. The extra test_dmdrvi diagnostic was staged only in the local validation image.

@JaxCalder JaxCalder changed the title Enable RTC calendar driver on STM32F746G-DISCO Start device drivers under RTOS and enable RTC Oct 16, 2026
@JohnAmadis
JohnAmadis merged commit 8909ed0 into master Oct 16, 2026
9 of 10 checks passed
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.

2 participants