This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EK-TM4C1294XL: I2C Loopback, is it possible to send and received more than 1 byte at same time

Part Number: EK-TM4C1294XL
Other Parts Discussed in Thread: TMP117

Tool/software:

Hi, All

I am test the I2C loopback example in doc spma086, and would like to try send more than 1 byte at same time, is it possible? I modified the code to do 4 bytes sending at a time, sending seems ok, but receives 4 same bytes, which is not right. 

Thank you.

Ping

  • Hi,

    I am test the I2C loopback example in doc spma086, and would like to try send more than 1 byte at same time, is it possible?

      I just ran the example as-is and I have no problem receiving what is transmitted. This example continuously has the master transmit 1 byte at a time and the slave is receiving the same data that was transmitted. Since it is continuously transmitting, it is definitely transmitting more than 1 byte. Maybe your question is that you want to send in BURST instead of SINGLE. If that is the case, you will need to use the BURST command. Refer to the i2c_tmp117_demo in the app note. 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    I2C Loopback Example ->
    Module = I2C0
    Mode = Single Send/Receive
    Rate = 100kbps
    Tranfering from: Master -> Slave
    Master Sending: 0
    Slave received: 0
    Master Sending: 1
    Slave received: 1
    Master Sending: 2
    Slave received: 2
    Master Sending: 3
    Slave received: 3
    Master Sending: 4
    Slave received: 4
    Master Sending: 5
    Slave received: 5
    Master Sending: 6
    Slave received: 6
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This app note Using Feature Set of I2C Master on TM4C129x has detailed description on how to use BURST mode. 

  • Hi, Charles

    Thanks for reply.

    Yes, you are right, the code works as it is, what I am trying is burst mode  - modified code to send 4 bytes a time, and try to receive 4 bytes at the receive side, however, it received 4 bytes same values. So I guess in loopback mode, it is not possible to do more than 1 bytes at a time? 

    Will look at the example code too.

    On a separate question, while I am going through the freeRTOS code examples you sent me, wonder whether there is any example project use Ethernet in freeRTOS? also if I try to use ethernet in freeRTOS, do I need to use lwip1.4.1, or use TCP+IP provided by freeRTOS? is there any demo for that please?

    Regards!

    Ping 

  • On a separate question, while I am going through the freeRTOS code examples you sent me, wonder whether there is any example project use Ethernet in freeRTOS? also if I try to use ethernet in freeRTOS, do I need to use lwip1.4.1, or use TCP+IP provided by freeRTOS? is there any demo for that please?

    Hi Ping,

      Please refer to the other post I just answered you regarding FreeRTOS with Ethernet.