AnsweredAssumed Answered

USB HOST Interrupt

Question asked by futureelectronics on Mar 17, 2013
Latest reply on Mar 20, 2013 by futureelectronics
Hello...
Now i design USB Host System. In the system there are 2 button interrupts, USB Host Interrupt. I use STM32_F105-07_F2xx_USB-Host-Device_Lib_V2.0.0 libraries and stm32f105...

In the system, i sometimes disable and enable button interrupts when i enter interrupt routine of button and when i enter USB Process function of USB libraries... i use system clock 8MHz for my system and PLL for my USB Host Clock...

NVIC priorities is as follows: 

1- Button interrupts(for each two) : 
    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 3;
    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;

2- my USB board support package configuration : 
   Timer : 
       NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
       NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;

   USB Global Int. 
       NVIC_InitStructure.NVIC_IRQChannel = OTG_FS_IRQn; 
       NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 5;
       NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;

And my button enable disable code is follows : 
void STM32_UP_Button_OnOff(FunctionalState NewState)
{    


    EXTI_InitTypeDef EXTI_InitStructure;


    /* Initializes the EXTI_InitStructure */
    EXTI_StructInit(&EXTI_InitStructure);
    EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
    EXTI_InitStructure.EXTI_Line = UP_BUTTON_EXTI_LINE;
    EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
    EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;   
  
    //EXTI_ClearITPendingBit(UP_BUTTON_EXTI_LINE );
    /* Disable the DOWN_BUTTON_EXTI_LINE on falling edge */
    if(NewState == DISABLE)
    {
        
        EXTI_InitStructure.EXTI_LineCmd = DISABLE;
        
    }
    /* Enable the EXTI DOWN_BUTTON_EXTI_LINE on falling edge */
    else
    {
        /* Clear the the DOWN_BUTTON_EXTI_LINE interrupt pending bit */
        //E
        EXTI_InitStructure.EXTI_LineCmd = ENABLE;


    }
    EXTI_Init(&EXTI_InitStructure);
              
}


The problem is that when program works in USBH_USR_MSC_Application function, the button enable/disable does not work even if i see that  External Interrupt Mask Register sets register in Keil... i can not enter button interrupts even if i enable button interrupts in USBH_USR_MSC_Application function? i want to change my enable, disable status in this function but i could not... 

Thanks in advance
Best regards

Outcomes