Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 4 Review.

Similar presentations


Presentation on theme: "ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 4 Review."— Presentation transcript:

1 ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 4 Review

2 ENTC-489 Embedded Real Time Software Development Today’s Agenda Review – Development Tools and Turning in H/W – ERTSD Vocabulary – Tasks and Task States – OS Timers – Counting Semaphores – Binary Semaphores – Mutexes I2C – Understanding I2C communication – SHT21 Temperature/Humidity Sensor Operation

3 ENTC-489 Embedded Real Time Software Development ERTSD Vocabulary What is the difference between a kernel and an operating system? Compare – Superloops – Foreground/Background Systems – Kernel Interrupts are (Foreground? Background?) What makes a function reentrant?

4 ENTC-489 Embedded Real Time Software Development ERTSD Vocabulary Define Real-Time – Hard Real-Time – Soft Real-Time What makes software deterministic? What does the term deterministic have to do with the term Real-Time? What is the difference between a cooperative kernel and a preemptive kernel?

5 ENTC-489 Embedded Real Time Software Development ERTSD Vocabulary Five Possible Task States in a Kernel, what does each mean? – Dormant – Ready – Pending – Running – Interrutped

6 ENTC-489 Embedded Real Time Software Development ERTSD Vocabulary In uC/OS-II which is a higher priority? – 15 – 31 What do these parameters do in OSTaskCreate()? – void (*task)(void *pd) – void *pdata – OS_STK *ptos – UINT8U prio

7 ENTC-489 Embedded Real Time Software Development ERTSD Vocabulary What is a semaphore? – Binary – Counting What is “deadlock” when applied to a kernel? How can you avoid deadlock? What is “priority inversion”? What is a Mutex? Why would you use one?

8 ENTC-489 Embedded Real Time Software Development ERTSD Vocabulary Explain these functions – OSSemCreate() – OSSemPost() – OSSemPend() – OSSemAccess()

9 ENTC-489 Embedded Real Time Software Development Homework Architecture

10 ENTC-489 Embedded Real Time Software Development RTOS Demonstration Volunteers – Timer – Kernel – Idle Task – Task 1 – Task 2 – Main

11 ENTC-489 Embedded Real Time Software Development Break

12 ENTC-489 Embedded Real Time Software Development What is I2C Multi master, Multi slave serial protocol Two Wires, SDA & SCL 7 Bit addresses Speed – 100 kb/s Standard – 400 kb/s Fast mode – 1 Mb/s Fast mode + – 3.4 Mb/s High Speed mode – 5 Mb/s Ultra-Fast mode

13 ENTC-489 Embedded Real Time Software Development Architecture

14 ENTC-489 Embedded Real Time Software Development Message Structure Start Condition indicates the master is setting up communication Ack, the “sender” releases SDA and the “receiver” pulls it low if no error Stop Condition lets all devices on the bus know to listen for a Start Condition again

15 ENTC-489 Embedded Real Time Software Development Clock Stretching After receiving last data bit, the slave holds the clock line low until it is ready. Ack is set to the correct state, usually 0 Clock line is released for master to continue

16 ENTC-489 Embedded Real Time Software Development Repeated Start Condition Used when more than one message must be sent to complete an operation. e.g. reading a byte from an EEPROM Master, Slave, S=Start, P=Stop

17 ENTC-489 Embedded Real Time Software Development Real Life Example SHT-21 Measures temperature and humidity Fast mode I2C (up to 400 kb/s)

18 ENTC-489 Embedded Real Time Software Development SHT-21 Performance

19 ENTC-489 Embedded Real Time Software Development Addressing & Commands 7 Bit address is 0b1000000 – Address to write 0b10000000 or 0x80 – Address to read 0b10000001 or 0x81 Commands:

20 ENTC-489 Embedded Real Time Software Development Why are there 2 measurement commands? 4 mS Hold, freezes I2C bus for 160 potential message bytes 85 mS Hold, freezes I2C bus for 3400 potential message bytes The SHT-21 is not our only I2C device on this board

21 ENTC-489 Embedded Real Time Software Development Measure the Humidity


Download ppt "ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 4 Review."

Similar presentations


Ads by Google