title: STM32 F1 - How to configure CAN filters using CAN interrupts?
body: <p>I can configure CAN filters from main.c file, but I want also to configure them by sending frame from the other node. There is the code from interrupt I want to use to configure filters:</p>
  
  <pre><code>    HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
      sFilterConfig.FilterMode = CAN_FILTERMODE_IDLIST;
      sFilterConfig.FilterScale = CAN_FILTERSCALE_32BIT;
      sFilterConfig.BankNumber = hcan.pRxMsg-&gt;Data[1];
      sFilterConfig.FilterNumber = hcan.pRxMsg-&gt;Data[2];
      sFilterConfig.FilterIdHigh  = (hcan.pRxMsg-&gt;Data[3])&lt;&lt;5;
      sFilterConfig.FilterIdLow = 0;
      sFilterConfig.FilterMaskIdHigh = 0;
      sFilterConfig.FilterMaskIdLow = 0;
      sFilterConfig.FilterFIFOAssignment = 0;
      sFilterConfig.FilterActivation = ENABLE;
      HAL_CAN_ConfigFilter(&amp;hcan, &amp;sFilterConfig);
  </code></pre>
  
  <p>For example I'm sending Data[1] = 1, Data[2]=0.
  When I'm sending the frame, the LED changes it's state, so it should work. I used analogous code in main.c file to configure filter while programming STM and it works properly. It's that even possible to configure CAN filters while STM is working? If yes, then where am I wrong?</p>