SAI in IRQ mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SAI in IRQ mode

495 Views
oaf
Contributor IV

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 :smileyangry:

Tags (3)
0 Kudos
1 Reply

265 Views
marek_neuzil
NXP Employee
NXP Employee


Hello,

I am sorry the SAI is a very complex device and we are not able to analyse the issue according to provided fragment of your application. Could you provide the whole application for analysis of this issue?

You can also use the KSDK_1.1.0\demos\sai_demo application as an example of fsl_sai component usage.

Best Regards,

Marek Neuzil

0 Kudos