Rainbow Electronics AT75C310 User Manual
Page 129

AT75C310
129
eor r5, r5, r2
mov r2, r2, LSL #8
orr r4, r4, r2
bl rx_poll
eor r5, r5, r2
mov r2, r2, LSL #16
orr r4, r4, r2
bl rx_poll eor r5, r5, r2
mov r2, r2, LSL #24
orr r4, r4, r2
; Store the 32 bit value
str r4, [r6l, #4
; decrement the counter
subs r3, r3, #4
b read_loop
;-----------------------------------------------------------------------------
; End of the Down Load Loop. Now wait for DSR to reset then send the checksum
; for the values which have just been downloaded.
;-----------------------------------------------------------------------------
; Read Modem Status and check that DSR has been reset.
waitDSR
ldr rl, USARTO_ModS_Reg
ldr r2, [rl]
teq r2,#Ox2O
bne waitDSR
send-csum
mov r2, r5
bl send-byte
; Reset RTS
ldr rl, USARTO_ModC_Reg
ldr r2, = OxOO
str r2, [rl]
; Wait for the execute command
bl rx_poll
cmp r2, #Ox47
bne fail_loop
bl rx_poll
cmp r2, #Ox6f
bne fail_loop
; Acknowledge
mov r2, #OxO6
bl send_byte
; And Go for it ...
mov r6, #RAM_BASE
mov pc, r6
;-----------------------------------------------------------------------------
; rx_poll_timed
; Wait for a character to be received. The wait is limited by the Timeout
; value in register r6, if this value goes to zero then the code
; jumps to REMAP.
;
; Trashes rl, r2
;-----------------------------------------------------------------------------r
rx_poll-timed
subs r6, r6, #OxOl
beq remap
ldr rl, USARTO_CSR_Reg
ldr rl, [r1]