Design Time Checking: Consequences and Benefits
During the design time, Processor Expert performs instant checking
of the project. As a result of this checking, error messages may
appear in the Error Window or directly in
the third column of the Bean Inspector
(on the faulty items line). Sometimes, it may happen that only one small
change in the project causes several (general) error messages. The most
common reasons for this behavior are stated below.
On-Chip Peripherals
Some beans use on-chip peripherals. In the Bean Inspector you can
choose from all possible peripherals that can be used for implementation
of the function of the current bean. Processor Expert provides checking
for required peripheral features such as word width and stop bit for
serial channel, pull resistor for I/O pin and others.
Processor Expert also protects against the use of one peripheral in two
beans. If the peripheral is allocated for one bean then the settings of
this peripheral cannot be changed by any other bean. The state of an
allocated peripheral should never be changed directly in the user code. (Using
special registers, I/O ports etc.) We recommend to always use methods
generated by Processor Expert. If the functionality of generated
methods is not sufficient for your application, you can use PESL (Processor
Expert System Library). See chapter Low-level Access
for details.
Note that if a peripheral is allocated to any bean, all
its parts are reserved. For example if you use the 8-bit I/O port, all the
I/O pins of the port are allocated and it is not possible to use them in
other beans.
In some timer beans you can choose if you want to use only a part of
the timer (compare register) or an entire timer. If you select the entire
timer, the driver can be optimized to best work with the timer: it can,
for example, invoke reset of the timer whenever is it needed by the bean
function.
Interrupt Priority
If the target CPU shares interrupt priority between several interrupt
vectors or shares interrupt vectors, Processor Expert provides checking of
interrupt priority settings. If you would like to have more detailed
information about Interrupt Priority see the Priorities
page.
Memory
Processor Expert always checks the usage of internal and external
memories accessible via CPU address and data bus. Position and size of
internal memory is defined by the CPU type and can be configured in the
CPU Properties (if supported). External memories must be defined in CPU
Properties.
Any bean can allocate a specified type of memory. See bean descriptions
for detailed information about requirements for types of memory. Processor
Expert provides checking of memory and protects you from making a poor
choice. (For example: if a bean requires external Flash, it is not
possible to enter an address in internal RAM).
The bits can also allocate memory. Therefore you can be sure that only
one bean uses an allocated bit of a register in external address space.
Timing
The settings of all timed devices are checked. If no error is detected,
it means that you can work with the given settings without a problem in
run-time. Generated drivers are provided in such a way that they cannot
influence each other - this means that, even if several beans share one
physical device, changes in the bean settings using the values given (and
checked) by Processor Expert are possible in run-time without affecting
any other bean.
Dealing with errors:
- One bean reports an error in the Project
panel
Take a look at the bean inspector dedicated to the bean.
Highlighted (red) values report an error (move a mouse pointer on to
the message to get more information).
- Several beans report an error in the Project
panel
- Only one bean is incorrectly set
If you cannot directly detect the faulty bean, just go through
all the beans reporting an error. If a message 'Timing setting
failed because of another bean' is reported then this bean seems
to be OK, but, due to hardware dependency, it is temporarily
blocked by the faulty bean. If another message is reported (for
instance: 'Timing settings failed in X speed mode - ...') read the
message carefully. It describes the error.
- More than one bean is incorrectly set
If all the beans report the error message 'Timing settings
failed in X speed mode', then it means that these beans are
mutually dependent on the hardware level and their settings do not
tally. Usually, you will see a message saying 'ERROR: The
following devices mutually block their timing settings:
list_of_beans' in the Error window. You may be helped in your
error diagnosis by looking at the hardware dependencies with the Target
CPU Timing Model. A typical example of hardware dependencies
is timers sharing a single prescaler.
If not all the beans report such a message, then several beans
are incorrectly set and you should read the messages carefully to
detect the faulty beans.
[top of page]
|