Peripheral Beans cover all the hardware functionality and they are intended for expert use of the respective
peripherals. This bean implements the Autonomous periodical interrupt (API) module
of the Freescale HCS12X MCU derivatives.
Peripheral initialization
The bean contains no high level methods or events, it provides only initialization of the hardware module. By default is the internal
initialization called automatically from the "PE_low_level_init" in CPU module, analogous to the initialization of other
PE beans. However the calling of this init code in the CPU module can be disabled and the user may call this function in
another module
If the initialization property
"Call init in CPU init.code" is set to
"no" then the initialization is removed
from the CPU module code and the user have to call the
'BeanName_Init()' function elsewhere, i.e. in the main module.
Interrupt service
Processor Expert™ generates interrupt service support of API peripheral only for the interrupt vector which the ISR routine
name is specified for. Otherwise the interrupts are served by the default routine(s). The support include interrupt vector
hooking and priority setting for the respective interrupt vector.
The peripheral beans does not generate code for the interrupt service routines specified in the Interrupts properties group
of the Init_API bean (see Bean Inspector window). If there are any of the interrupts enabled in the bean the user is responsible
for the handling of such ISR's. Correct interrupt service routine "ISR name"must be implemented in the user code.
Warning:
This is low level bean. Usually it is not possible to use one setting of this bean for different microcontrollers.
Autonomous periodical Interrupt module
Subblock API can generate periodical interrupts independent of the clock source of the MCU. To enable
the timer, the bit APIFE needs to be set.
The API timer is either clocked by a trimmable internal RC oscillator or the bus clock. Timer operation
will freeze when MCU clock source is selected and bus clock is turned off. The clock source can be selected with bit
APICLK. As soon as the configured timeout period of the API has elapsed, the APIF bit is set.
An interrupt, indicated by flag APIF = 1, is triggered if interrupt enable bit APIE = 1.
Peripheral Initialization Beans provide a low-level hardware approach to
initialize registers of the peripheral module. They are intended for experienced users.
This bean belongs to the category: CPU Internal Peripherals-Peripheral Initialization Beans