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

Testing multiple interrupts from FPGA, different priorities, preemption, etc #350

Open
5 tasks done
Tracked by #324
npetersen2 opened this issue Nov 30, 2023 · 4 comments
Open
5 tasks done
Tracked by #324
Assignees
Labels
v2 For FreeRTOS codebase

Comments

@npetersen2
Copy link
Collaborator

npetersen2 commented Nov 30, 2023

Verify that interrupts are working.

  • the interrupt signal (sched_isr) is being asserted as per FPGA logic and at the correct time
  • test basic interrupt on CPU 0 (set manually)
  • test basic interrupt on CPU 1 (set manually)
  • the interrupt is calling the handler (isr0) after scheduler
  • enable the second interrupt and test that can also be sent at a lower/high priority
@annikaolson
Copy link
Contributor

annikaolson commented Mar 1, 2024

After looking at some online resources and discussing on the 2/27 meeting, we realized the issue was very likely dual-core related.

I tried running it on CPU 0 - with the basic interrupt that is manually set (i.e. interrupt = slv_reg0 and have a test_int() function in timing_manager.c that sets slv_reg0 to 1) - and that called the ISR.

Image

Edit:

Tested the same interrupt on CPU, used the following function & arguments: XScuGic_InterruptMaptoCpu(intc_instance_ptr, 1, INTC_INTERRUPT_ID_1);

Success!

Image

@annikaolson
Copy link
Contributor

annikaolson commented Mar 1, 2024

Current issue:

While I can now get an interrupt generated on CPU 1, I noticed that the ISR for the sched_isr interrupt (the one that is actually used) was still not being called... I tested the basic interrupt before and after the scheduler is initialized:

And the ISR is no longer called.
this post looks to be a very similar situation (private timer interrupts and 2 PL-PS interrupts)

@annikaolson
Copy link
Contributor

Got it working, but I had to initialize the timing manager (and thus the PL-PS interrupts) after the scheduler - I put a print statement in the scheduler isr to see if that was still being called, and it is - so this might work? it might just be more efficient to put everything in one function, though

Image

@annikaolson
Copy link
Contributor

ISR0_called

@annikaolson annikaolson mentioned this issue Mar 4, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 For FreeRTOS codebase
Projects
None yet
Development

No branches or pull requests

2 participants