srio boot example: padded transfer size to 4-byte align
authorIvan Pang <i-pang@ti.com>
Mon, 25 Jan 2016 01:33:29 +0000 (19:33 -0600)
committerIvan Pang <i-pang@ti.com>
Mon, 25 Jan 2016 01:33:29 +0000 (19:33 -0600)
boot_loader/examples/srio/srioboot_example/src/srioBootExample.c

index 0a98f3789e069f07275c2eb0a1778f533060a163..3932e705d8fbc1d62b48e2c515b66b4ee6e43cab 100755 (executable)
@@ -266,6 +266,11 @@ int32_t pushData2Srio(uint8_t *pDspCode,int32_t DeviceID)
         /* Get the size */
         size =         byteto32bits(pDspCode);
         if(size == 0) break;
+
+        /* Ensure transfer is 4-byte aligned */
+        if(size%4)
+            size += (4-(size%4));
+
         pDspCode += 4;
 
         startaddr = byteto32bits(pDspCode);