]> sigrok.org Git - sigrok-firmware-fx2lafw.git/commitdiff
Ensure GPIF is idle before reconfiguration
authorJoel Holdsworth <redacted>
Sat, 10 Mar 2012 22:46:00 +0000 (22:46 +0000)
committerJoel Holdsworth <redacted>
Sat, 10 Mar 2012 22:58:26 +0000 (22:58 +0000)
gpif-acquisition.c

index 32fe330d980c7af11daaa40669c1b6e570c00b8d..a597a86dcb312661ba6db6b4459ac15ec30f6f14 100644 (file)
@@ -128,6 +128,9 @@ void gpif_acquisition_start(const struct cmd_start_acquisition *cmd)
 {
        xdata volatile BYTE *pSTATE;
 
+       /* Ensure GPIF is idle before reconfiguration */
+       while(!(GPIFTRIG & 0x80));
+
        /* Set IFCONFIG to the correct clock source */
        if(cmd->flags & CMD_START_FLAGS_CLK_48MHZ) {
                IFCONFIG = bmIFCLKSRC |