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.

MSPM0G3507: I2c busy wait

Part Number: MSPM0G3507

Tool/software:

Hi, I am working with mspm0g3507 and i am using i2c interface for sensor. i am able to communicate with sensor in polling method but it has some busy wait. do you have anything that i can do to remove busy wait and delays. i dont want to use interrupt. 

  • How will you know when your request is finished?

    Generally you have two choices: (a) ask the device (poll) or (b) have the device actively tell you (interrupts).

    The term "busy-wait" usually suggests polling continuously, doing nothing else (though interrupts from other devices can pre-empt the polling). One can imagine using a "not-so-busy-wait" using:

    1) Timed polling: Use/create an external mechanism for time-delay, e.g. timer-based (using sleep) or RTOS, and poll at a regular (slower) interval.

    2) Ad-hoc polling: Define a driver API to start a request, and provide a function to check (poll) for completion at a time convenient to the application.

    3) Read-ahead/write-behind: Define a driver API to start a request, then check (poll) for completion before starting the next request.

    If you can describe your application's architecture and environment, we might be able to give you better answers.