33.4 Operation
While the detailed operation of the Flexible Interface Modules is beyond the scope of this manual, this sec-
tion will describe how to initialize and start the Flexible Interface Modules.
The following steps explain how to load and start a Flexible Interface Module application.
1. If desired, write the appropriate interrupt vector for the interrupt service routine to the internal inter-
rupt table.
2. Enable the appropriate Flexible Interface Module clock in MSCR.
3. Write a 0 to bit 7 of FxICR to disable the Flexible Interface Module and allow loading of the appli-
cation.
4. Write the Flexible Interface Module application to the address range starting at FxCLR and
FxCMR.
5. Write a 1 to bit 7 of FxICR to enable the Flexible Interface Module. If interrupts from the module
are to be used, set the priority level in bits 0–1 of FxICR as well.
6. The Flexible Interface Module is now running the loaded application.
33.4.1 Handling Interrupts
The interrupt receive/acknowledge handshaking between the Flexible Interface Module and the Rabbit
6000 has to be handled manually for both the Flexible Interface Module interrupting the Rabbit and vice
versa. Sample code for each is shown below.
33.4.1.1 Rabbit Interrupt Request to Flexible Interface Module
ld a, 0x55
ioi ld (FAIIR), a
ld b, 255
waitForFIM:
dec b
jp z, timeout
ioi ld a, (FAIOR)
bit 7, a
jr z, waitForFIM
ld a, 0x00
ioi ld (FAIIR), a
request
Rabbit 6000 User's Manual
; send interrupt 0x55 to FIMA
; timeout counter for FIM ack
; decrement timeout counter
; exit to timeout handling routine
; get interrupt status from FIMA
; check interrupt ack bit
; loop until FIMA ack's the interrupt
; FIMA has ack'd, so clear interrupt
digi.com
372
Need help?
Do you have a question about the 6000 and is the answer not in the manual?