olofk / serv

SERV - The SErial RISC-V CPU
ISC License
1.36k stars 178 forks source link

serv irq problem #125

Closed guillemmmm closed 3 months ago

guillemmmm commented 3 months ago

I have my serv cpu running and when a new irq comes (that I suppose that have to be enough long to be in an instruction cycle) my program goes to the MTVEC adress. But the current adress is not stored in the MEPC. So when the interrupt handle finishes, it goes to the main function forgetting that we were in another function, thus overflowing the system stack, (since the SP is not reset).