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

[Question] What is the correct way to send an interrupt to the cpu? #172

Open
IAmSegfault opened this issue Jan 3, 2023 · 0 comments
Open

Comments

@IAmSegfault
Copy link

I'm evaluating whether I should use this library for a project but I'm not too familiar with Risc-V. I saw in the source that there is a memory address that looks like an interrupt vector for the cpu.
const CSR_MIP_ADDRESS: u16 = 0x344;
Would I set the correct flag here for timer, hardware and software interrupts before calling the tick method on the cpu if I only want the cpu running in machine and debug mode?
Also is the machine interrupt vector table for calling my service routine hardcoded at const CSR_MTVEC_ADDRESS: u16 = 0x305;?

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