Skip to content

xspiloader: Avoid spurious TIM12 interrupts - #8

Merged
mkj merged 1 commit into
CodeConstruct:mainfrom
mkj:pr/xspiloader-tim12
Sep 30, 2026
Merged

mkj merged 1 commit into
CodeConstruct:mainfrom
mkj:pr/xspiloader-tim12

Conversation

@mkj

@mkj mkj commented Sep 30, 2026

Copy link
Copy Markdown
Member

When the timer is enabled, interrupts will continue after the payload boots, causing spurious interrupts (unless TIM12 is reconfigured by the booted program). That would result in hitting DefaultHandler after the program runs.

xspiloader doesn't need embassy-time, so don't enable any time driver. TIM12 is the default timer driver interrupt.

This doesn't affect loading usbnvme since it that embassy-time and configures TIM12. It could affect other programs loaded by xspiloader using newer embassy-stm32 or other configurations.

@mkj
mkj force-pushed the pr/xspiloader-tim12 branch from 9ae6dbb to 4c85a01 Compare September 30, 2026 08:58
When the timer is enabled, interrupts will continue after the payload
boots, causing spurious interrupts (unless TIM12 is reconfigured by the
booted program). That would result in hitting DefaultHandler after the
program runs.

xspiloader doesn't need embassy-time, so don't enable any time driver.
TIM12 is the default timer driver interrupt.

This doesn't affect usbnvme since that uses embassy-time and configures
TIM12. It could affect other programs loaded by xspiloader, using newer
embassy-stm32 or other configurations.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
@mkj
mkj force-pushed the pr/xspiloader-tim12 branch from 4c85a01 to 89d42c0 Compare September 30, 2026 08:59
@mkj
mkj merged commit 89d42c0 into CodeConstruct:main Sep 30, 2026
1 of 3 checks passed
@mkj
mkj deleted the pr/xspiloader-tim12 branch September 30, 2026 08:59
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