void main(void)
{
/* Initialize CSL library - This is REQUIRED !!! */
CSL_init();
/* PLL configuration structure used to set up PLL interface */
// 主频为300Mhz
PLL_setFreq(1, 0xF, 0, 1, 3, 3, 0);
/* Set IVPH/IVPD to start of interrupt vector table */
IRQ_setVecs((Uint32)(&VECSTART));
CHIP_RSET(XBSR,0x0001);
GPIODIR |= 0x4; // config the GPIO2 as output pin,RESET
GPIODIR |=0x10; //config the GPIO4 as output pin,COVENT
GPIODIR |= 0x1; //config the GPIO0 as input pin FE
GPIODIR |= 0xFD; //config the GPIO1 as input pin
GPIODIR |= 0x40; //config the GPIO6 as input pin BF
GPIODATA |=0x04; //GPIO2=1,RESET AD
delay1(1); //延时
GPIODATA &=0xFB; //GPIO2=0