Version 1.3
Page 21 of 36
SMT332/372 User Manual
Example Code
The following examples illustrate the use of the FIFOs.
FIFO Reset
// make a copy of the current EMIF CE3 mode
old_ce3 = *EMIF_CE3_CTRL;
// This writes to the ‘C6x01 internal EMIFCE3 control register
// at address 0x01800014, and sets it to async mode
*EMIF_CE3_CTRL = 0xffff3f23;
// To reset the FIFOs (including flag positions), just write to
// address 0x03004000
// The value of 0 is important to set the correct FIFO mode
*SMT332FIFORST=0x00000000;
// This is a delay before we switch the EMIF_CE3 space back to
// synchronous mode
for(i=0;i<1;i++) {};
// Switch back to sync mode
*EMIF_CE3_CTRL = old_ce3;