AnsweredAssumed Answered

SAI in IRQ mode

Question asked by Ole Asbjorn Fadum on Jan 21, 2015
Latest reply on Feb 9, 2015 by Marek Neuzil

KDS-2.0.0, KSDK-1.1.0, FRDM-K64F

 

I'm trying to use SAI in IRQ mode without any success (I'm using ProcessorExpert).

 

My initialization looks like this:

 

    OSA_InstallIntHandler(I2S0_Tx_IRQn, I2S0_Tx_IRQHandler);
   OSA_InstallIntHandler(I2S0_Rx_IRQn, I2S0_Rx_IRQHandler);

 

   /*! saiCom1 Rx Auto initialization start */
   SAI_DRV_RxInit(FSL_SAICOM1, &saiCom1_InitConfig0, &I2S_saiCom1_RxState);

 

   SAI_DRV_RxRegisterCallback(FSL_SAICOM1, I2S_RxCallback, NULL);
   SAI_DRV_RxConfigDataFormat(FSL_SAICOM1, &saiCom1_DataConfig0);

 

   /*! saiCom1 Rx Auto initialization end */
   NVIC_SetPriority(I2S0_Tx_IRQn, 112U);
   NVIC_SetPriority(I2S0_Rx_IRQn, 112U);

 

I then try to start a transfer like this: (buffSize == 64)

   /*
     * 21-jan-15 oaf SAI_DRV_ReceiveData() calls SAI_DRV_RxStartModule()
     */
   SAI_DRV_ReceiveData(FSL_SAICOM1, I2S_config.buff, I2S_config.buffSize);
       SAI_DRV_RxSetIntCmd(FSL_SAICOM1, true);

 

The result is a reboot

Outcomes