Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nRF52: a single interrupt activation doesn't work #4527

Open
perttierkkila opened this issue Oct 17, 2024 · 0 comments
Open

nRF52: a single interrupt activation doesn't work #4527

perttierkkila opened this issue Oct 17, 2024 · 0 comments

Comments

@perttierkkila
Copy link
Contributor

perttierkkila commented Oct 17, 2024

TLDR: nRF52 blinky example doesn't work when serial is disabled.

Env

tinygo version 0.33.0 darwin/arm64 (using go version go1.22.5 and LLVM version 18.1.2)

This is a pretty wild bug which goes down to interrupt enable and this one line https://github.com/tinygo-org/tinygo/blob/release/src/runtime/runtime_nrf.go#L61

intr.Enable()

When this line is replaced code from Enable() with constant value, IRQ works properly. Only difference is internal irq.num is not used. Enabling any other IRQ doesn't do the trick.

arm.EnableIRQ(uint32(nrf.IRQ_RTC1))

And the weird part, if application enables ANY IRQ (for example IRQ num 240 which doesn't exist), IRQ_RTC1 starts working also. Due this, default settings with serial enabled, keeps IRQ_RTC1 working properly and hides a bug.

At least 0.31 worked properly as I have used serial=none setting a long time. Please keep older versions at brew to allow easily allow switching version. Now it is pretty PIA.

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

No branches or pull requests

1 participant