HC08 Full Chip Simulation
Configuration Procedure
286
Microcontrollers Debugger Manual
which give the addresses of peripheral registers on the microcontroller. Following this
comes the variable declarations for pointers, counters, and buffers for the received data.
In the Flash ROM, the message descriptions are given, which indicate the destination
address, message priority, message length, and the actual data. Note that the number of
data bytes can be variable sizes from 0-8. The information needed in these descriptions
can be found in the CAN specification and the 68HC908AZ60A datasheet.
After the message descriptions come the actual code, where there are some procedures for
handling different tasks. The first is the initialization procedure, which sets up the registers
in the CAN peripheral for the intended operation. The CAN peripheral is also enabled at
the end of the routine. After this comes the start of the application in the MAIN_INIT
procedure, where we call the initialization routines, initialize the pointers and counters,
and wait for an interrupt to occur. There is one interrupt service routines for the CAN
peripheral in this code which is triggered when the peripheral receives CAN messages
specifically intended for it. Note that this application is totally interrupt driven, where the
code is driven by any events that take place through the CAN peripheral.
The end of the code shows the interrupt vectors for the microcontroller, where the CAN
interrupts and the RESET vector are included. All other vectors are pointed to a dummy
interrupt service routine that simply returns from the interrupt.
Once the above mentioned assembly code is compiled as a part of the Freescale project,
one can step through it in the Full Chip Simulation mode. The execution starts
automatically at the reset location within the code. We are now ready to start debugging
the code.
First, we need to step through the beginning of the code in the simulator in order to allow
the code to initialize the microcontroller and the CAN peripheral and get ready to start
receiving CAN packets from the network. So, the user needs to step through the beginning
of the code until they get to the main loop with the
t
command.
At this point we are ready for CAN packets to come into the device. There are three
specific commands in the simulator for testing the CAN peripheral: CANIN, CANOUT,
and CANCLR (see detailed MSCAN commands description below). The CANIN
command allows a user to specify messages coming into the CAN peripheral. The
CANOUT command allows a user to see the packets that were sent out from the CAN
peripheral. The CANCLR command allows the user to clear all input and output buffers of
CAN packets.
Now we can use the CANIN command to specify CAN packets that come from the
network to our device. When a user types this command in the simulator, the CAN IN
window appears as shown in
Figure 11.26
. There are no CAN packets specified yet in the
window, so we will enter some into it.
Содержание Microcontrollers
Страница 1: ...Microcontrollers Debugger Manual Revised 22 October 2007 ...
Страница 20: ...Table of Contents 20 Microcontrollers Debugger Manual ...
Страница 24: ...Book I Contents 24 Microcontrollers Debugger Manual ...
Страница 60: ...Debugger Interface Highlights of the User Interface 60 Microcontrollers Debugger Manual ...
Страница 156: ...Debugger Components Visualization Utilities 156 Microcontrollers Debugger Manual ...
Страница 198: ...Real Time Kernel Awareness OSEK Kernel Awareness 198 Microcontrollers Debugger Manual ...
Страница 236: ...Synchronized Debugging Through DA C IDE Troubleshooting 236 Microcontrollers Debugger Manual ...
Страница 238: ...Book II Contents 238 Microcontrollers Debugger Manual ...
Страница 332: ...HC08 Full Chip Simulation Configuration Procedure 332 Microcontrollers Debugger Manual ...
Страница 348: ...MON08 Interface Connection Device Class Description 348 Microcontrollers Debugger Manual ...
Страница 364: ...ICS MON08 Interface Connection Device Class Description 364 Microcontrollers Debugger Manual ...
Страница 428: ...HC08 FSICEBASE Emulator Bus State Analyzer BSA 428 Microcontrollers Debugger Manual ...
Страница 430: ...Book III Contents 430 Microcontrollers Debugger Manual ...
Страница 466: ...HCS08 Full Chip Simulation Peripheral Modules Commands 466 Microcontrollers Debugger Manual ...
Страница 476: ...HCS08 P E Multilink Cyclone Pro Connection Connection Procedure 476 Microcontrollers Debugger Manual ...
Страница 486: ...HCS08 Open Source BDM Connection First Steps From Within an Existing Project 486 Microcontrollers Debugger Manual ...
Страница 496: ...HCS08 Serial Monitor Connection First Steps from Within an Existing Project 496 Microcontrollers Debugger Manual ...
Страница 544: ...HCS08 On Chip DBG Module HCS08 DBG V3 New Features 544 Microcontrollers Debugger Manual ...
Страница 546: ...Book IV Contents 546 Microcontrollers Debugger Manual ...
Страница 560: ...RS08 P E Multilink Cyclone Pro Connection Connection Procedure 560 Microcontrollers Debugger Manual ...
Страница 574: ...SofTec RS08 Connection First Steps From Within an Existing Project 574 Microcontrollers Debugger Manual ...
Страница 576: ...Book V Contents 576 Microcontrollers Debugger Manual ...
Страница 698: ...Book VI Contents 698 Microcontrollers Debugger Manual ...
Страница 714: ...Flash Programming NVMC Commands 714 Microcontrollers Debugger Manual ...
Страница 730: ...Book VII Contents 730 Microcontrollers Debugger Manual ...
Страница 840: ...Book VIII Contents 840 Microcontrollers Debugger Manual ...
Страница 864: ...Book IX Contents 864 Microcontrollers Debugger Manual ...
Страница 868: ...Legacy Target Interfaces Removed 868 Microcontrollers Debugger Manual ...
Страница 891: ...891 Microcontrollers Debugger Manual ...
Страница 892: ...892 Microcontrollers Debugger Manual ...