From: Joel Holdsworth Date: Sat, 10 Mar 2012 22:46:00 +0000 (+0000) Subject: Ensure GPIF is idle before reconfiguration X-Git-Tag: sigrok-firmware-fx2lafw-0.1.0~50 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3b969d92f4cecf79ebe4289e0facb98dea9b844d;p=sigrok-firmware-fx2lafw.git Ensure GPIF is idle before reconfiguration --- diff --git a/gpif-acquisition.c b/gpif-acquisition.c index 32fe330d..a597a86d 100644 --- a/gpif-acquisition.c +++ b/gpif-acquisition.c @@ -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 |