Common Hardware and Manufacturing Issues in Embedded Systems Debugging

cse190 winter 2020 lecture 5 debugging hints n.w
1 / 16
Embed
Share

Discover the challenges faced while debugging hardware in embedded systems, including common data sheet errors, manufacturing faults, and the crucial role of bootloaders. Learn about using LEDs as breakpoints and the importance of serial buses for communication with peripherals in microcontrollers.

  • Embedded Systems
  • Debugging
  • Hardware Issues
  • Manufacturing Faults
  • Serial Buses

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CSE190 Winter 2020 Lecture 5 Debugging Hints and Intro to Busses Wireless Embedded Systems Aaron Schulman

  2. Hardware is hard. Who do you trust when things are going wrong? Your software? Your users? Your test equipment? Your test equipment configuration? The device designer? The datasheet authors? The circuit board designer? The manufacturer and assembler? Physics?

  3. Data sheet errors are common Which one of these is correct? SAM21 data sheet in 2017, and 2018 for I2C

  4. Manufacturing errors are common PCB assembly fault ( tombstoning ) resistors Circuit board manufacturing fault (signal shorted to GND)

  5. When all else fails, the bootloader can save the day! When your software has a bug in it that causes the processor to hang or crash, you can t do anything! Programming over USB requires the processor to be responsive (a reset message is sent over USB at the beginning of the programming) The bootloader is a small bit of code run at boot time that doesn t get overwritten It has just enough code in it to reflash over USB Normally it just jumps into your code, but you can force it to wait for a program by pressing reset button twice. https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders/zero

  6. Even one LED can be critical for debugging Think of an LED as a breakpoint Turn it on before a line of code Lets you know you reached that line Turn it off after a line of code Lets you know you exited that code segment Toggle it each time a repeated event is called This can show you visually how often the event happens

  7. Serial Busses Digital data highways that external peripherals use to communicate with microcontrollers 7

  8. Serial Buses in our project UART serial bus for sending debug messages to your development host I2C serial bus for communicating with sensors (e.g., the accelerometer) SPI serial bus for communicating with the Bluetooth Low Energy radio 8

  9. We use an internal peripheral for serial communication w/external devices traps & exceptions C Assembly ldr (read) str (write) Machine Code Software SVC# ISA Hardware CPU fault INT# System Buses AHB/APB interrupts Interrupts Internal & External Memory GPIO/INT Timers USART DAC/ADC Internal External 9

  10. Parallel Bus vs Serial Bus Parallel Serial What is the benefit of a serial bus over a parallel bus (and vice versa)?

  11. Simplistic View of Serial Port Operation Transmitter 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 0 1 2 3 4 5 0 1 2 3 4 0 1 2 3 0 1 2 0 1 0 Receiver n n+1 n+2 n+3 n+4 n+5 n+6 n+7 n+8 n n+1 n+2 n+3 n+4 n+5 n+6 n+7 n+8 7 6 7 5 6 7 4 5 6 7 3 4 5 6 7 2 3 4 5 6 7 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Interrupt raised when Receiver (Rx) is full Byte has been received and is ready for reading Interrupt raised when Transmitter (Tx) is empty Byte has been transmitted and next byte ready for loading

  12. Serial Bus Interface Motivations Motivation Without using a lot of I/O lines I/O lines require I/O pads which cost $$$ and size I/O lines require PCB area which costs $$$ and size Connect different systems together Two embedded systems A desktop and an embedded system Connect different chips together in the same embedded system MCU to peripheral MCU to MCU Often at relatively low data rates But sometimes at higher data rates So, what are our options? Universal Synchronous/Asynchronous Receiver Transmitter Also known as USART (pronounced: you-sart ) 12

  13. Serial Bus Design Space Number of wires required? Asynchronous or synchronous? How fast can it transfer data? Can it support more than two endpoints? Can it support more than one master (i.e. txn initiator)? How do we support flow control? How does it handle errors/noise? How far can signals travel? 13

  14. Serial Bus Examples S/A Type Duplex #Device s Speed (kbps) Distance (ft) Wires RS232 A Peer Full 2 20 30 2+ RS422 A Multi- drop Half 10 10000 4000 1+ RS485 A Multi- point Half 32 10000 4000 2 I2C S Multi- master Half ? 3400 <10 2 SPI S Multi- master Full ? >1000 <10 3+ Microwi re S Master/ slave Full ? >625 <10 3+ 1-Wire A Master/ slave half ? 16 1000 1+

  15. UART Uses PC serial port is a UART! Serializes data to be sent over serial cable De-serializes received data Slides from BYU CS 224

  16. UART Uses Used to be commonly used for internet access Slides from BYU CS 224

More Related Content