Embedded Systems, Buses and Networks: UART, SPI, I2C, AXI, TCP/IP

How chips talk to each other and to the processor: the UART, SPI and I2C buses, interrupts and polling, the AXI handshake inside a chip, and the network layers that carry data between computers. Every Verilog model was simulated and every C program was run, and each part ends with exercises and their solutions. Start with Part 1 and work through in order.

The section is built as a short course in seven parts. Part 1 compares UART, SPI and I2C side by side: how many wires each needs, how fast each runs, and how each one frames a byte. Parts 2 and 3 go deeper into SPI (the four CPOL and CPHA modes, with timing diagrams of when data is launched and sampled) and I2C (START and STOP conditions, the ACK bit, addressing and clock stretching). Part 4 covers how the processor finds out that data has arrived, comparing an interrupt service routine with a polling loop in measured latency and CPU time.

Part 5 moves inside the chip to AXI4-Lite, the bus an FPGA or SoC uses to connect a processor to a peripheral, with the valid and ready handshake on each of its five channels. Part 6 steps out to networks: the OSI and TCP/IP models, what each layer adds to a packet, and how much of the wire actually carries your data. Each part lists its prerequisites, so you can also start from the one you need.

For hands-on work, pair this section with the projects: the UART transmitter and receiver in Verilog, the FPGA UART echo, and the ESP32 CAN bus project. If you are preparing for interviews, the embedded systems interview questions page tests the same ideas with short answers.

6 posts