FLEXIO_I2C_MasterTransferBlocking implementation is missing from SDK 2.0

cancel
Showing results for 
Search instead for 
Did you mean: 

FLEXIO_I2C_MasterTransferBlocking implementation is missing from SDK 2.0

272 Views
alexfeinman
Contributor III

If I generate an SDK for an SKU that has FLEXIO (1.0 or 1.1), the resulting fsl_flexio_i2c_master.h contains the following definition:

status_t FLEXIO_I2C_MasterTransferBlocking(FLEXIO_I2C_Type *base,

                                           flexio_i2c_master_handle_t *handle,

                                           flexio_i2c_master_transfer_t *xfer);

However the corresponding fsl_flexio_i2c_master.c does not have the implementation. Obviously, I can implement it myself using FLEXIO_I2C_MasterTransferNonBlocking and a loop, but it looks like an unintentional omission that needs to be corrected

Labels (1)
Tags (2)
0 Kudos
2 Replies

64 Views
DavidS
NXP Employee
NXP Employee

Hi Alex,

Good find.

I will notify the KSDK_v2 team.

UPDATE:

status_t FLEXIO_I2C_MasterTransferBlocking(FLEXIO_I2C_Type *base, flexio_i2c_master_transfer_t *xfer)

{

    assert(xfer);

    flexio_i2c_master_handle_t tmpHandle;

    uint32_t statusFlags;

    uint32_t result = kStatus_Success;

    FLEXIO_I2C_MasterTransferCreateHandle(base, &tmpHandle, NULL, NULL);

    /* Set up transfer machine. */

    FLEXIO_I2C_MasterTransferInitStateMachine(base, &tmpHandle, xfer);

    do

    {

        /* Wait either tx empty or rx full flag is asserted. */

        while (!((statusFlags = FLEXIO_I2C_MasterGetStatusFlags(base)) &

                 (kFLEXIO_I2C_TxEmptyFlag | kFLEXIO_I2C_RxFullFlag)))

        {

        }

        result = FLEXIO_I2C_MasterTransferRunStateMachine(base, &tmpHandle, statusFlags);

    } while ((tmpHandle.state != kFLEXIO_I2C_Idle) && (result == kStatus_Success));

    return result;

}

The KSDK_v2 team is looking into the issue.

Regards,

David

http://www.nxp.com/products/identification-and-security/nfc-and-reader-ics/connected-tag-solutions/n...

64 Views
alexfeinman
Contributor III

David,

This appears to be taken from the K80 SDK. It seems that unlike FLEXIO 1.1, the SDKs for FLEXIO 1.0 parts, such as KL17 I am using, are based on older code and do not have some of the calls referenced here implemented (e.g. FLEXIO_I2C_MasterTransferInitStateMachine)

UPDATE: Sorry, was looking it the wrong place. This works fine. Thank you. Hoping to see this in the SDK eventually.

0 Kudos