Digital Electronics EEE3017W - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Digital Electronics EEE3017W

Description:

If the voltage is unstable for some reason, a malfunction may occur ... caused by the microcontroller malfunctioning or the surrounding circuitry ... – PowerPoint PPT presentation

Number of Views:106
Avg rating:3.0/5.0
Slides: 25
Provided by: robynve
Category:

less

Transcript and Presenter's Notes

Title: Digital Electronics EEE3017W


1
Microcontroller Reliability Issues
  • Often microcontroller systems are used in
    environments where high reliability is required
  • This requires the hardware and software systems
    to be of high quality
  • The applications must also be able to recover
    from possible error conditions gracefully

2
System Malfunctions
  • Even if the hardware and software systems are
    well designed, they might malfunction
  • It is important to note that not all malfunctions
    are of equal magnitude
  • There are two main factors to consider when
    rating a malfunction
  • How often does the malfunction occur
  • How serious is it
  • The seriousness of a problem must justify the
    cost in fixing it

3
GT16s Reliability Features
  • The GT16 has several features which can be used
    to recover from errors
  • These protect against
  • Infinite loop lock up
  • Power supply brown out
  • One way of recovering from these errors is to
    reset the microcontroller

4
GT16s Reliability Features
  • The GT16 has several modules which can be used to
    improve system reliability
  • These include the
  • Computer Operating Properly (COP) module
  • Low Voltage Detection Module
  • Illegal Address Reset
  • Illegal Opcode Reset

5
Computer Operating Properly Unit
  • The COP module is used to prevent runaway code
    and infinite looping
  • It consists of a large counter connected to the
    systems clock
  • If the counter overflows a reset is triggered
  • The program should reset the counter often so
    that it does not overflow
  • Therefore the COP module should not cause a
    system reset under normal operation
  • The COP module is also known as the watch dog
    timer

6
System Options Register
  • This is known as the SOPT register
  • It is used to setup the COP module and to enable
    Background debugging
  • There are two possible count values
  • COPT 1 COP period is 218 cycles
  • COPT 0 COP period is 213 cycles
  • Cycles are from the bus clock

7
Example
  • What is the maximum time between COP resets if
    the bus frequency is 18.87 MHz and the COPT bit
    is HIGH?

8
Solution
9
COP Module Resetting
  • Resetting the COP counter is achieved by writing
    data to a register known as the SRS
  • Any write to this address causes the timing
    period to start at zero
  • The COP module can also be disabled by clearing
    the COPD (COP Disable) bit in the SOPT register
  • Do not place the COP reset in an interrupt
    handler
  • The main program might crash, interrupt handling
    may work but the COP will still be reset
    periodically and will not provide any protection

10
Low Voltage Detect Module
  • A microcontroller requires a fairly stable
    voltage supply to operate correctly
  • If the voltage is unstable for some reason, a
    malfunction may occur
  • This could be caused by the microcontroller
    malfunctioning or the surrounding circuitry
    causing false inputs to the controller
  • If the microcontroller still functions properly
    but the surrounding circuits shutdown and power
    up again this could cause very serious system
    failure

11
Low Voltage Detection
  • LVD is used to help protect against these types
    of faults
  • It is also known as a brown out protection system
  • A brown out is a temporary power dip
  • If the supply voltage is dipping but not far
    enough to cause a system malfunction, then GT16
    can inform your program by means of the Low
    Voltage Warning System (LVW)
  • These modules are controlled by the System Power
    Management Status and Control Registers

12
System Power Management Status and Control
Registers
  • This is known as the SPMSC1 register

13
System Power Management Status and Control
Registers
  • This is known as the SPMSC2 register

14
Illegal Address Reset
  • Often program crashes result from it trying to
    refer to an illegal address at some point
  • As an example lets say that you implement a RTS
    instruction from an interrupt
  • This loads the top two bytes in the stack into
    the PC
  • In the case of an interrupt the top two bytes are
    the CCR and the accumulator
  • These would be loaded into the PC and interpreted
    as an address
  • This could cause maloperation

15
Illegal Opcode Reset
  • Each instruction in the HC08 is 8-bits wide
  • This means that there should be 256 possible
    opcodes
  • Not all of these opcodes are implemented
  • If the program attempts to execute an
    unimplemented opcode a system reset will occur

16
System Reset Status Register
  • This is known as the SRS register
  • A logic 1 indicates the cause of the latest
    system reset
  • It is also used to reset the COP module

17
Low Power Microcontroller Operation
  • Microcontrollers are often used in applications
    where power conservation is important
  • These include
  • Portable Applications
  • Standby Systems
  • Remote Applications
  • It is important to conserve power for
    environmental reasons
  • In all of these applications, designers need to
    manage how much power their systems consume

18
Low Power Microcontroller Operation
  • The faster electronic circuitry runs, the more
    power it needs
  • The faster you clock your microcontroller the
    higher current it will draw
  • The relationship between current and clock speed
    is quite linear
  • For this reason your clock speed should be
    matched to the task that it is to perform
  • Some systems have software controller clock
    management systems, however the GT16 does not

19
GT16 Low Power Modes
  • Another way to save power is to turn the
    processor off when it is not being used
  • The GT16 has two low power modes
  • Wait
  • Stop
  • These modes differ in the amount of circuitry
    they shut down
  • Using these modes we are able to put the system
    into low power mode with out causing a system
    reset
  • The wake up signal can be provided by an external
    signal or by one of the on board peripherals

20
Wait Mode
  • In wait mode the CPUs clock is stopped but
    peripheral clocks are enabled
  • This means that the CPUs clock draws very little
    current
  • The peripherals can therefore wake up the CPU
  • Wait mode is entered by using the WAIT instruction

21
Peripherals in Wait Mode
  • In wait mode these peripherals have the following
    status
  • IRQ This pin may wake the CPU by causing an
    interrupt
  • ADC This maybe enabled or disabled. The ADC
    draws a lot of power therefore if it is not used
    disable it. If it is used it will wake up the CPU
    when it causes an interrupt
  • TIMER It also consumes a lot of power due to its
    clock. If it is not used then disable it. A timer
    interrupt will wake the CPU

22
Stop Mode
  • If the wait mode consumes too much power then use
    STOP mode
  • This mode causes the crystal oscillator to shut
    down which stops all clocks
  • Practically the only power consumed by the device
    is leakage current
  • There are fewer wake options in this mode
  • It is entered by using the STOP instruction

23
Peripherals in Stop Mode
  • The status of the peripherals in stop mode is as
    follows
  • IRQ This pin doesnt need a clock and therefore
    can wake up the device
  • ADC No wakeup possible
  • TIMER No wakeup possible

24
Notes for Low Power Mode
  • The processor is not the only thing that draws
    current in a microcontroller
  • Port pins also do therefore check that no pins
    are sourcing or sinking current in low power mode
  • Check that all inputs are held either high or low
    especially for the ADC pins
Write a Comment
User Comments (0)
About PowerShow.com