[J-core] Is there a way to have periodic interrupts on the Numato board?

Rob Landley rob at landley.net
Mon Oct 28 18:26:46 EDT 2019


On 10/11/19 6:43 PM, Joh-Tob Schäg wrote:
> Mhh it looks like i forgot a branch in my email.
> 
> If there is a periodic interrupt timer how do i start him?

Did this already get replied to?

> My current approach looks like this:
> 
> 
> #include "board.h" // comes with jcore-source-latest from the website
> 
> int main(int argc, char* argv[]){
> uint32_t SR_Proto = 5<<4;
> asm("LDC %0, SR;"
>     :
>     : "r" (SR_Proto)
>     ); // set minimum interrupt level to 5
> 
> (DEVICE_AIC0)->pit_throttle = 0x0FFFFFFF;
>                        //count   pit_en  prio    Inter  count  
> (DEVICE_AIC0)->ctrl0 = ((0<<25)+(1<<26)+(6<<20)+(128<<12)+0); // enable 
> interrupt of level 6 which hits the 129th function in the interrupt table
> 
> do_something();
> return 0;
> };
> 
> This interrupt trigger only once. Not every x ms. (I have not looked into how x
> is calculated from throttle)

I vaguely recall Linux re-enabling the interrupt in the interrupt handler?

I sent you an infodump on this a while back, I think before the list went back
up? Lemme try to dig it up and forward it to the list so we can find it again...

Rob


More information about the J-core mailing list