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

}




            static void NVIC_Conf(void)
            {
                    NVIC_InitTypeDef NVIC_InitStructure;

                    #ifdef  VECT_TAB_RAM

                      /* 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
                    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);




                    NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
                    //Select Interrupt channel Usart1
                    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority =0; //Interrupt Group First
            priority

                    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2; //last priority in the Group

                    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;         //Enable Interrupt Channel
                    NVIC_Init(&NVIC_InitStructure);



                    //Second

                    NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn;
                    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority =0;
                    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;

                    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

                    NVIC_Init(&NVIC_InitStructure);


                    //Third

                    NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;

                    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority =1;
                    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;




                                                         -  191  -
   193   194   195   196   197   198   199   200   201   202   203