while(1)
{
LCD_ShowString(30,50,"please wait...");
TIM_Cmd(TIM2, ENABLE);
while(!timeup);
timeup=0;
GPSledon;
TIM_Cmd(TIM2, DISABLE);
LCD_ShowString(30,50,"getting GPS data...");
DMA_Configuration();
USART_DMACmd(USART1, USART_DMAReq_Rx, ENABLE);
DMA_Cmd(DMA1_Channel5, ENABLE);
// while(!DMAflag);
while (DMA_GetFlagStatus(DMA1_FLAG_TC5) == RESET);//while(!(DMA1->ISR&(1<<17)));//等待通道5传输完成
DMA_ClearFlag(DMA1_FLAG_GL5); //--调试部分
DMA_ClearFlag(DMA1_FLAG_TC5);
DMA_Cmd(DMA1_Channel5, DISABLE);
DMA_ClearFlag(DMA1_FLAG_GL5);
DMA_ClearFlag(DMA1_FLAG_TC5);
//DMA1->IFCR|=1<<17;//清除通道5传输完成标志
/* System Clocks Configuration */
RCC_Configuration();
/* NVIC configuration */
NVIC_Configuration();
/* Configure the GPIO ports */
USART1_Configuration(); //----------
LCD_Fill(30, 50, 200, 70,WHITE);
LCD_ShowString(30,115,(u8*)GPSdata);
GPSledoff;
if(GPSdataformat())
{
LCD_ShowString(30,220,"location and time:");
}