1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S b/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S
index 0f68a2f..ed43017 100644
--- a/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S
+++ b/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S
@@ -91,11 +91,16 @@ lcd_grey_data:

 1:
     ldr     r5, [lr, #0xC]      @ DBOP_STAT
-    ands    r5, r5, #(1<<10)    @ wait until push fifo empties
-    beq     1b
+    ands    r5, r5, #(1<<6)    @ wait until push fifo is full
+    bne     1b

     subs    r2, r2, #1
     bne     .greyloop

+1:
+    ldr     r5, [lr, #0xC]      @ DBOP_STAT
+    ands    r5, r5, #(1<<10)    @ wait until push fifo empties
+    beq     1b
+
     ldmfd   sp!, {r4-r8, pc}
     .size   lcd_grey_data,.-lcd_grey_data