Page 811 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 811

/* Set the Vector Table base location at 0x20000000 */
                       NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
                     #else  /* VECT_TAB_FLASH  */
                       /* Set the Vector Table base location at 0x08000000 */
                       NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
                     #endif
             }


             void RCC_Configuration(void) //다른  시스템  클락  설정
             {
                     SystemInit();
                     RCC_APB2PeriphClockCmd
                       (RCC_APB2Periph_USART1|RCC_APB2Periph_GPIOA|RCC_APB2Periph_GPIOB|
                        RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOD|RCC_APB2Periph_GPIOE|
                        RCC_APB2Periph_ADC1|RCC_APB2Periph_AFIO|RCC_APB2Periph_SPI1,
                        ENABLE );
                    //RCC_APB2PeriphClockCmd(RCC_APB2Periph_ALL ,ENABLE );
                    RCC_APB1PeriphClockCmd
                       (RCC_APB1Periph_TIM4|RCC_APB1Periph_USART2|RCC_APB1Periph_USART3|
                        RCC_APB1Periph_TIM2, ENABLE );
                    RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
             }


             void Init_All_Periph(void)
             {
                     RCC_Configuration();
                     GPIO_Configuration();
                     NVIC_Configuration();
                     USART1_Configuration();
                     USART2_Configuration();
             }


             void Delay(vu32 nCount)
             {
               for(; nCount != 0; nCount--);
             }


             void SendMessage(void)
             {
                printf(menu);
                USART1Write((u8*)"Hello         World!        USART1_Test\n\r",sizeof("Hello         World!



                                                         -  804  -
   806   807   808   809   810   811   812   813   814   815   816