Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Conversation

@dpc
Copy link
Contributor

@dpc dpc commented Aug 29, 2014

No description provided.

@bharrisau
Copy link
Contributor

Interrupts are still a bit ugly at the moment.

Could you try moving the WFI instruction to the lib::support module? I've been meaning to create functions for all the 'extra' ASM instructions supported by the devices.

@dpc
Copy link
Contributor Author

dpc commented Aug 29, 2014

I will move wfi to support, OK.

I actually found it surprisingly easy to plug-in my own ISR. I wasn't aware on the way Cortex-Mx handle exception, coming from Cortex-Ax.

What I'm unsure about is what is agreed on approach of handling global values from ISR. System-level Rust has some strong guarantees on aliasing, which ISR obviously break by definition. It's still not that hard, comparing to what should be done in case of SMP...

@dpc dpc force-pushed the app_blink_k20_isr branch from f49a10a to 96a22fa Compare August 29, 2014 06:35
@dpc
Copy link
Contributor Author

dpc commented Aug 29, 2014

r?

@farcaller
Copy link
Member

LGTM as a proof of concept, but we must get rid of this later on. I don't see how can we communicate from ISR to task code without globals, so we need to limit the code to minimal possible. The best case — top half is generated implicitly in PT and talks to bottom half with optional user-managed code via some queue.

@bharrisau
Copy link
Contributor

Sorry - you'll need to rebase this as I moved some stuff around.

@dpc dpc force-pushed the app_blink_k20_isr branch from 96a22fa to 1003723 Compare August 29, 2014 07:16
@dpc
Copy link
Contributor Author

dpc commented Aug 29, 2014

Done.

@bharrisau
Copy link
Contributor

I was thinking something similar to a queue too. Push notifications in from interrupts, pull out from the main loop. Would need to be threadsafe to prevent a pre-mpted interrupt from ruining something.

@bharrisau
Copy link
Contributor

Thanks for this.

bharrisau added a commit that referenced this pull request Aug 29, 2014
k20: Introduce `app_blink_k20_isr`.
@bharrisau bharrisau merged commit f63f1e4 into hackndev:master Aug 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants