fix: stm32-lv r2(4) and copy(1) has different data unit size

pull/932/head
xp 2020-04-25 20:21:13 +08:00
rodzic 9096984a83
commit 8b77d027d3
2 zmienionych plików z 18 dodań i 6 usunięć

Wyświetl plik

@ -8,12 +8,18 @@ mycopy:
add r10, r10, r12
myloop:
# copy 1 bytes
# copy 1 byte each time and 4 times as one group
ldrb r3, [r0]
ldrb r4, [r0, #1]
ldrb r5, [r0, #2]
ldrb r6, [r0, #3]
strb r3, [r1]
strb r4, [r1, #1]
strb r5, [r1, #2]
strb r6, [r1, #3]
add r0, r0, #1
add r1, r1, #1
add r0, r0, #4
add r1, r1, #4
# wait if FLASH_SR == 1
mywait:

Wyświetl plik

@ -8,12 +8,18 @@ mycopy:
add r10, r10, r12
myloop:
# copy 1 byte
# copy 1 byte each time and 4 times as one group
ldrb r3, [r0]
ldrb r4, [r0, #1]
ldrb r5, [r0, #2]
ldrb r6, [r0, #3]
strb r3, [r1]
strb r4, [r1, #1]
strb r5, [r1, #2]
strb r6, [r1, #3]
add r0, r0, #1
add r1, r1, #1
add r0, r0, #4
add r1, r1, #4
# memory barrier
dsb sy