RTOS SDK - Enable SPI Interrupt

jhinkle
Posts: 32
Joined: Tue Apr 19, 2016 12:09 am

RTOS SDK - Enable SPI Interrupt

Postby jhinkle » Mon Apr 25, 2016 8:53 am

This is what I have for initializing a SPI interrupt to occur when the package transaction is done

Code: Select all


   ETS_INTR_LOCK();
   
   _xt_isr_attach(ETS_SPI_INUM, HSpi_Interrupt, NULL);
   

   ETS_INTR_UNLOCK();

   SET_PERI_REG_MASK(SPI_SLAVE(1), SPI_TRANS_DONE_EN);   //  | SPI_SLV_WR_BUF_DONE_EN
   
   _xt_isr_unmask(1 << ETS_SPI_INUM);




The interrupt is not firing so I know something is wrong.

Please advise me where I'm wrong.

I fond very little documentation about this when dealing with RTOS and had to take a best guess on what I found relative to standard SDK.

Thanks.

jhinkle
Posts: 32
Joined: Tue Apr 19, 2016 12:09 am

Re: RTOS SDK - Enable SPI Interrupt

Postby jhinkle » Tue Apr 26, 2016 2:22 am

Solved it.

I was missing _xt_isr_unmask(1 << ETS_SPI_INUM);

I added to the code above -- it works!

Who is online

Users browsing this forum: No registered users and 15 guests