KSDK-1.1 SAI documentation error

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

KSDK-1.1 SAI documentation error

426 Views
oaf
Contributor IV

In the KSDK v-1.1 API Reference Manual Rev. 0 (file:///C:/Freescale/KSDK_1.1.0/doc/Kinetis%20SDK%20v.1.1%20API%20Reference%20Manual/group__sai__driver.html)

the steps to use SAI is as follows:

1. Initialize the SAI module by calling the SAI_DRV_TxInit() function.
2. Configure the audio data features of SAI by calling the SAI_DRV_TxConfigDataFormat() function.
3. Send/receive data by calling the SAI_DRV_SendData() or the SAI_DRV_ReceiveData() functions.
4. Start Tx or Rx by calling the SAI_DRV_TxStartModule() or the SAI_DRV_RxStartModule() function.

5. Shut down the SAI module by calling the SAI_DRV_TxDeinit() function.

But when I investigate the source (KSDK_1.1.0\platform\sai\fsl_sai_driver.c)

The Send/Receive_Data looks like this:

/*FUNCTION**********************************************************************

*

* Function Name : SAI_DRV_SendData

* Description   : The function would tell sai driver to start send a period of

* data to sai tx fifo.

*END**************************************************************************/

uint32_t SAI_DRV_SendData(uint32_t instance, uint8_t *addr, uint32_t len)

{

    sai_state_ids[instance][0]->len = len;

    sai_state_ids[instance][0]->address= addr;

    SAI_DRV_TxStartModule(instance);

    return len;

}

/*FUNCTION**********************************************************************

*

* Function Name : SAI_DRV_ReceiveData

* Description   : The function would tell sai driver to start receive a period of

* data from sai rx fifo.

*END**************************************************************************/

uint32_t SAI_DRV_ReceiveData(uint32_t instance, uint8_t *addr, uint32_t len)

{

    sai_state_ids[instance][1]->len = len;

    sai_state_ids[instance][1]->address= addr;

    SAI_DRV_RxStartModule(instance);

    return len;

}

The #4 (SAI_DRV_TxStartModule() / SAI_DRV_RxStartModule()) is performed by SAI_DRV_SendData() / SAI_DRV_ReceiveData() and are not necessary to call again.

Tags (3)
0 Kudos
1 Reply

297 Views
likong
NXP Employee
NXP Employee

Yes, you are right, we will modify the documents in 1.2 GA release, thanks!

0 Kudos