TM4C123 I2C I2C_MASTER_CMD_QUICK_COMMAND mode

hi 你好

請問, TM4C123 是否支援I2C , I2C_MASTER_CMD_QUICK_COMMAND 的模式, 

我設定此模式, 會造成系統崩潰, 我是運行在TI-RTOS 下,

我的程式如下, 當執行到 I2CMasterControl(I2CPortBase[I2C->bus], I2C_MASTER_CMD_QUICK_COMMAND); 就會崩潰, 

//Initialize Master and Slave

I2CMasterInitExpClk(I2CPortBase[I2C->bus], MAP_SysCtlClockGet(), iic_params[I2C->bus].bitRate==I2C_400kHz ? true : false);

// Specify slave address
I2CMasterSlaveAddrSet(I2CPortBase[I2C->bus], I2C->address, false);

// Initiate send of address from Master to Slave
I2CMasterControl(I2CPortBase[I2C->bus], I2C_MASTER_CMD_QUICK_COMMAND);

2. 我的環境如下
tirtos_tivac_2_14_04_31
TivaWare_C_Series-2.1.4.178
IAR 7.4
TM4C123BH6ZRB

謝謝

2 个回复

  • C:\ti\tirtos_tivac_2_16_01_14\resources\ek_tm4C1294XLEvaluationKit\driverExamples\tiDriverExamples

    这个文件夹下面就有例程的

    苦行僧。

  • 不支持I2C_MASTER_CMD_QUICK_COMMAND 的,您可以看一下

    12.2.1.3 ROM_I2CMasterControl

    Controls the state of the I2C Master module.
    Prototype:
    void
    ROM_I2CMasterControl(uint32_t ui32Base,
    uint32_t ui32Cmd)
    ROM Location:
    ROM_APITABLE is an array of pointers located at 0x0100.0010.
    ROM_I2CTABLE is an array of pointers located at ROM_APITABLE[3].
    ROM_I2CMasterControl is a function pointer located at ROM_I2CTABLE[18].
    Parameters:
    ui32Base is the base address of the I2C Master module.
    ui32Cmd command to be issued to the I2C Master module
    Description:
    This function is used to control the state of the Master module send and receive operations.
    The ui8Cmd parameter can be one of the following values:
    I2C_MASTER_CMD_SINGLE_SEND
    I2C_MASTER_CMD_SINGLE_RECEIVE
    I2C_MASTER_CMD_BURST_SEND_START
    I2C_MASTER_CMD_BURST_SEND_CONT
    I2C_MASTER_CMD_BURST_SEND_FINISH
    I2C_MASTER_CMD_BURST_SEND_ERROR_STOP
    I2C_MASTER_CMD_BURST_RECEIVE_START
    I2C_MASTER_CMD_BURST_RECEIVE_CONT
    I2C_MASTER_CMD_BURST_RECEIVE_FINISH
    I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP
    Returns:
    None.

    If a post answers your question, please mark it with the "verify answer" button.

    若是回复解决了您的问题,请点击“是”确认答案。谢谢!