From ceb643380b02d0d8289e3ad75a495123414ace8c Mon Sep 17 00:00:00 2001 From: henryk Date: Sun, 9 Dec 2007 06:10:56 +0000 Subject: Prevent late frames by spinning in SSC CP0 IRQ till end of short frame reception Fix tc_cdiv_set_divider. again. Reverse the polarity! (of the ssc transmit clock) git-svn-id: https://svn.openpcd.org:2342/trunk@381 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/os/boot/boot.s | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'openpicc/os') diff --git a/openpicc/os/boot/boot.s b/openpicc/os/boot/boot.s index e709b94..95bc130 100644 --- a/openpicc/os/boot/boot.s +++ b/openpicc/os/boot/boot.s @@ -52,6 +52,7 @@ .equ AT91C_TC_SWTRG, (1 << 2) .equ AT91C_TC_CLKEN, (1 << 0) .equ PIO_DATA, (1 << 27) +.equ PIO_FRAME, (1 << 20) .equ PIO_SSC_TF, (1 << 15) .equ PIOA_SODR, 0x30 .equ PIOA_CODR, 0x34 @@ -222,7 +223,14 @@ my_fiq_handler: movne r11, #PIO_DATA strne r11, [r10, #PIOA_IDR] /* disable further PIO_DATA FIQ */ - + beq .no_pio_data +/* .loop_high: + ldr r11, [r10, #PIOA_PDSR] + tst r11, #PIO_DATA + bne .loop_high + str r9, [r12, #TC_CCR] /* software trigger */ + +.no_pio_data: tst r8, #PIO_SSC_TF /* check for SSC Transmit Frame signal */ ldrne r11, [r10, #PIOA_PDSR] tstne r11, #PIO_SSC_TF /* check for SSC_TF == 1 */ -- cgit v1.2.3