Freescale Semiconductor, Inc. Order this document by EB350/D Motorola Semiconductor Engineering Bulletin Freescale Semiconductor, Inc... EB350 How to Use the MC68HC812A4 in Special Expanded Narrow Mode Using the M68HC12AEVB By Edgar Saenz Motorola Microcontroller Division Austin, Texas Introduction The MC68HC812A4 (812A4) is designed primarily as an expanded mode microcontroller. It can be operated in expanded narrow mode for 8-bit peripheral devices and in expanded wide mode for 16-bit peripheral devices. The M68HC12A4EVB (A4EVB) is designed to accommodate expanded narrow mode of operation, although in the factory it is configured in expanded wide mode. The steps to set up the evaluation board are described in this engineering bulletin. They are designed to help guide users to configure emulation RAM (random-access memory) in expanded narrow mode and to utilize a third-party debugger to debug in C language. © Motorola, Inc., 2000 EB350 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Engineering Bulletin Hardware Setup Setting up the A4EVB in special expanded narrow mode requires modifying the evaluation board. Freescale Semiconductor, Inc... Follow these steps to make the modification: • When setting up the evaluation board, turn off the power to the A4EVB. • Jumpers W42 and W34 should be shunted between pins 1 and 2. W30 should be left floating or pulled out. • Remove the 74HC32 chip from U3. • Make a wire jumper from pin 2 on U3 socket to pin 3. This will make a direct connection from the RAM-CS signal to RAM-MSB-CS. Chip enable (CE) on pin 22 will have a direct connection to chip select header W11. • Select CSP0 by shunting W11-8 between pin 2 and pin 3. CSP0 is enabled from reset and should be used to test the application program properly. • Insert RAM chip in socket U6B. Notice that U6A does not have address line 0 routed, and it is used for expanded wide mode. On the other hand, U6B does have address line 0 routed directly and is designed for the use of expanded narrow mode. • When memory paging is enabled, the EVB includes the footprint for a 28- and 32-pin RAM footprint. Address lines 16 and 18 are hardwired to U6B. However, address line 17 needs to be configured via jumper header W12 by shunting pin 3 and pin 4. EB350 2 MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Engineering Bulletin Software Setup Using P&E’s SDBUG12 Program Software Setup Using P&E’s SDBUG12 Program When using a software debugger in special expanded narrow mode, it is important to note that the mode register has to be modified. To start the program, simply get into the directory where the executable is loaded. Type sdbug12 freq x000000 where x is the A4EVB’s bus speed. Freescale Semiconductor, Inc... When this command is typed, either COM1 or COM2 can be used. Contact P&E Microcomputer Systems, Inc., at its Web site, www.pemicro.com, for specifics. Once the SDBUG12 screen is displayed, execute a register modify to ensure the software is communicating properly with the PC. Type A 55 and watch the screen value for the A accumulator value change. Reset it to 0 by typing A 00 and observe the A accumulator value change. So far, the microcontroller is in special single-chip mode. For expanded narrow mode functionality, the mode register needs to be written twice with $39 which will provide access to external peripherals in expanded narrow format and gain access to the bus in 8-bit mode where the data is provided on data lines d8 to d15. Make sure the chip select control register (CSCTL) has CSP0 enabled. Execute a memory modify command by typing mm 3C, and when the enter key is pressed, the debugger will provide the current value and designate a field to place the new value in. If the register does not show the proper value ($20) for CSP0 to be enabled, set it to the proper value. To check U6B’s accessibility, simply execute a memory modify command at a memory location inside the RAM’s address space. Type mm <address>, and the command will respond with the current value and prompt for the new value. If this is successful, download an S19 record to the microcontroller, provided that the record is within RAM’s range. EB350 MOTOROLA 3 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. N O N - D I S C L O S U R E Freescale Semiconductor, Inc... A G R E E M E N T R E Q U I R E D Engineering Bulletin Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters which may be provided in Motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including "Typicals" must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. How to reach us: USA/EUROPE: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217. 1-303-675-2140 or 1-800-441-2447. Customer Focus Center, 1-800-521-6274 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu, Minato-ku, Tokyo 106-8573 Japan. 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T., Hong Kong. 852-26668334 Mfax™ Motorola Fax Back System: [email protected]; http://sps.motorola.com/mfax/; TOUCHTONE 1-602-244-6609, US and Canada ONLY, 1-800-774-1848 HOME PAGE: http://motorola.com/sps/ Mfax is a trademark of Motorola, Inc. © Motorola, Inc., 2000 EB350/D For More Information On This Product, Go to: www.freescale.com