Application Example - Motorola Digital dna MSC8101ADS Manual

Table of Contents

Advertisement

Application Example

Table 3 shows all the MSC8101ADS switch settings to run the application discussed in Appendix B
from Flash memory
To run an application from the MSC8101ADS Flash memory, perform the following steps:
1.
2.
7
Application Example
In the example application discussed here, the green and red LEDs (LD10 and LD9, respectively) flash
continuously. This application note was tested with the following two files:
• LEDBlinker.c (see Appendix B)
• find_IMM.asm (see Appendix C)
main() within LEDBlinker.c calls Sinit(), which is located in find_IMM.asm. The purpose
of Sinit() is to initialize the MSC8101 internal memory map to 0x14710000. Determine what the ISB
(Internal Space Base) bits are after reset, and then set the memory map to 0x14710000 in the Internal
Memory Map Register (IMMR).
Execute this application out of Flash memory as follows:
1.
2.
3.
4.
6
Freescale Semiconductor, Inc.
Table 3. MSC8101ADS Switch Settings
Switch
1
2
SW1
on
off
on
SW2
on
on
on
SW9
on
on
on
SW10
off
on
on
SW11
off
off
off
(Optional) Remove the command converter connector from the MSC8101ADS.
This connection is for the debugger and is not used when an application runs from Flash memory.
Set up the MSC8101ADS. Run the application in Flash memory.
Either press PRESET (SW8) or re-apply power to the board.
Generate an S-record file for the application.
Create a C project for the MSC8101within the CodeWarrior folder and include the two files
LEDblinker.c and find_IMM.asm. This is done using the Project->Add Files menu
option.
Referring to Section 4, Generating an S-record File, step 2, enter the CodeWarrior settings to select
the proper environment and code generation settings, the correct linker command and C start-up file,
and to generate an S-record file.
Set up the
Post-Linker -> SC100 EFL to S-Record: Output File Name
Building the application generates an S-record file called LEDblinker.s.
Program the MSC8101ADS Flash memory.
Set up the HyperTerminal application (refer to Section 5, step 1) on the PC with the desired
parameters (baud rate, data bits, stop bits, parity, handshaking, and ASCII line delay). Also set up a
serial cable connection between the RS-232 serial COM port on the PC and the upper RS-232
connector on the MSC8101ADS.
Open the Flash programmer project provided with the CodeWarrior software.
For More Information On This Product,
Go to: www.freescale.com
3
4
5
6
on
on
on
on
off
on
off
on
on
7
8
on
on
off
off
to LEDblinker.s.

Advertisement

Table of Contents
loading

Table of Contents