Motorola MSC8101 ADS User's Guide Page 170

  • Download
  • Add to my manuals
  • Print
  • Page
    / 346
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 169
8-18 MSC8101 User’s Guide
Host Interface (HDI16)
Example 8-7. Receive Interrupt Set-up Code
; setup HI16 registers
move.l #M_HPCR,r1 ; r1 = HPCR address
move.l #M_HCR,r0 ; r0 = HCR address
move.w #INIT_HPCR,(r1) ; init HI16 HPCR
bmset.w #M_HEN,(r1) ; enable HI16
move.w #INIT_HCR,(r0) ; init HI16 HCR
move.w #BUFF,r3 ; r3 = pointer to buffer in memory
; set-up and enable interrupt
di
move.l #I_ELIRB,r1
bmclr #$00e0,sr.h ; enable all IPLs
move.w #INIT_ELIRB,(r1) ; set hi16 rxne IPL
bmset.w #M_HREIE,(r0) ; enable HI16 RX interrupt
ei ; enable interrupts
Example 8-8 shows code for a simple interrupt service routine that receives 16-bit data
from the HDI16 HORX into a buffer in memory. For simplicity, the initialization of buffer
pointer r3 and the saving of the SC140 core’s context are not shown.
Example 8-8. Receive Interrupt Service Routine
org p:#VBA_INIT+0x980 ; Receive FIFO not empty vector address
jsr hi16_rxne ; jump to ISR
rte ; return from interrupt
org p:HDI16_ISR ; ISR program code
hi16_rxne
move.w p:HORX_ADDR,d1 ; d1 = HORX data
move.w d1,p:(r3)+ ; move d1 to buffer in memory
rts ; return form ISR
8.3.3 Host Requests
The host request mechanism provides a set of signal lines by which the DSP can request
data transfers from the host. The request signal lines from the DSP normally connect to the
host’s interrupt request pins (
IRQx) and indicate to the host when a HDI16 port requires
service. The DSP side can be configured to use either a single request line (HREQ) for
both receive and transmit requests or two signal lines, a Host Transmit Request (HTRQ)
and a Host Receive Request (HRRQ), one for each direction of transfer.
Page view 169
1 2 ... 165 166 167 168 169 170 171 172 173 174 175 ... 345 346

Comments to this Manuals

No comments