Analog Devices ADSP-SC58 Series Hardware Reference Manual page 365

Sharc+ processor
Table of Contents

Advertisement

TRU Programming Model
Programming Examples
The following examples shows the steps to create a single trigger and a Timer period expiry event automatically tog-
gling a GPIO.
Configuring a Simple Trigger Sequence
The following example shows the steps to create a simple trigger.
1. Write to the
TRU_GCTL
2. Write to the
TRU_SSR[n]
3. Enable the trigger slave to wait for and accept a trigger.
4. Enable the trigger master to generate a trigger.
Toggle a GPIO on Timer Expiry Event
This example shows a case where a Timer period expiry event automatically toggles a GPIO. This is achieved by
programming the Slave trigger register for GPIO with the Timer as Master.
1. Enable a specific pin in the PORT F to toggle up on trigger ( )
2. Enable timer to generate trigger up
3. Program the Slave trigger 23
4. Enable the TRU (TRU_GCTL.EN bit).
*pREG_PORTF_TRIG_TGL = 0x00000010;
*pREG_TIMER1_TRG_MSK &= ~BITM_TIMER_TRG_MSK_TMR03;
*pREG_TRU1_SSR23 = TRGM_TIMER1_TMR3_MST;
*pREG_TRU1_GCTL = 0x1;
TRU Event Control
The TRU is a major part of event control solutions. It is the center of the trigger functional model and can extend
to support the interrupt and fault management models as well.
TRU Status and Error Signals
The TRU does not have dedicated status and error output signals other than the MMR interface. Slave errors are
reported to the master over the standard peripheral bus protocol.
ADSP-SC58x TRU Register Descriptions
Trigger Routing Unit (TRU) contains the following registers.
8–14
register to enable the TRU.
register of a specific trigger slave to assign it to a specific trigger master.
(TIMER_TRG_MSK
(TRU_SSR[n]
register) (this toggles the PORTs) with the Timer as the Master.
ADSP-SC58x/ADSP-2158x SHARC+ Processor Hardware Reference
register)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-2158 series

Table of Contents