10 I2C Programming in Real-Time Operating Systems

I2C transmissions are slow, typically 100 kHz. In systems like Arduino, your code must wait for each transmission or reception to complete before doing other work, which drastically reduces your application’s performance. While waiting, the CPU is just executing a busy-waiting loop (also called a spin loop), wasting CPU cycles. In this chapter, you’ll learn to use real-time operating systems (RTOSs) to put those CPU cycles to work.

This chapter introduces several different RTOSs—µC/OS, FreeRTOS, Teensy Threads, and Mbed—that you can run on typical SBCs, and it provides an example program ...

Get The Book of I2C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.