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

Joh-Tob Schäg johtobsch at gmail.com
Mon Oct 28 18:42:58 EDT 2019


On Mon, 28 Oct 2019 at 23:24, Rob Landley <rob at landley.net> wrote:
>
> 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?
>
I do not remember getting an reply. So on
> > 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 feared that. This makes regular timings (every x ms/ns) more
difficult (i suspect).

>
> 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...

That would be helpful, thanks.


More information about the J-core mailing list