Page 305 - Embedded Microprocessor Systems Real World Design
P. 305

Levels 1 through 3 have fewer privileges. The essential point is that the MMU
                   will not permit any memory access that is off-limits to a program at a given privi-
                   lege level. A memory segment can be set so that it is  read-only for levels 1 and
                   below. A program at privilege level 0 can write to that segment, but a program at
                   level 1,2, or 3 can only read it. Other registers in the MMU control things like what
                   privilege level is permitted to disable interrupts or to modify the MMU registers.

                   Motorola
                   The Motorola memory management scheme on the 68060 is different from Intel’s,
                   but the result is the same-a  table is used to translate a logical address to a physical
                   address. The 68060 has seven key MMU registers. One register points to a descrip
                   tor table for the supervisor level and one register points to the user descriptor table.
                   One register controls various functions like page size (4K or 8K) , and four registers
                   provide translation information for code and data (two registers each).

                   Exception Handling

                  What happens when a program tries to write to read-only memory or disable inter-
                   rupts when its privilege level is not high enough? When this happens, an exception
                   is generated by  the MMU. An exception is similar to an interrupt and handled
                   much the same way. Exceptions are not disabled by disabling interrupts, although
                   the MMU can be programmed not to generate exceptions. The exception handler,
                   part of the operating system, decides what to do if an illegal operation is attempted.


                   Application-Specific Microcontrollers


                   Traditionally, microcontrollers have been general-purpose devices, with port pins,
                   timers, and other features that the designer could program for a specific applica-
                   tion. Some newer microcontrollers are targeted at specific markets with specialized
                   interfaces or other 1/0 features. A few brief examples follow:
                    The Microchip rfPIC12C509AG/509AF is a PIGfamily microcontroller with a 310
                    to 480MHz RF transmitter on-chip.
                    Most microcontrollers have primarily digital I/O.  Some devices provide limited
                    analog 1/0 capability with ADCs or onchip comparators, but most of  the 1/0
                    pins are still digital. The Microchip PIC16C781/’782 microcontrollers turn this
                    around; these  devices are  designed as programmable analog controllers and
                    include an  %channel, &bit ADC,  an &bit DAC,  a programmable opamp, two
                    programmable analog comparators, and a PWM output module.
                    Other microcontrollers include onchip USB  interfaces, LCD  controllers, and
                    in-CAN bus interfaces. All  of  these devices are intended to provide a low-cost
                    solution to a specific class of design problems.


                   286                                             EmWd Micr@rocessw Systems
   300   301   302   303   304   305   306   307   308   309   310