diff --git a/ubb-la/ubb-la.c b/ubb-la/ubb-la.c index dfa0a01..f94cb93 100644 --- a/ubb-la/ubb-la.c +++ b/ubb-la/ubb-la.c @@ -190,10 +190,19 @@ static void xfers(unsigned long *bufs, int n_bufs, int nibbles) dma_setup(bufs[0], nibbles); while (1) { + int j; + MSC_STRPCL = MSC_STRPCRL_START_OP; + /* + * Experimental value for 12 MSa/s: hangs always/usually with + * 231 cycles, hangs sometimes with 232, hands never (so far) + * with 233. + */ + for (j = 0; j != 233; j++) asm volatile (""); + // while (MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY); - while (!(MSC_STAT & MSC_STAT_END_CMD_RES)); +// while (!(MSC_STAT & MSC_STAT_END_CMD_RES)); IN(UBB_CMD);