I program STM32F103 based on a Arduino IDE and use MS studio as an editor. Arduino IDE knows how to attachInterrupts() to a GPIO port but there is no interface for other peripherals like TIMERS and ADC's.
The predefined handler function used in HAL like ADC1_IRQHandler being part of the HAL libraries are not supported under the Arduino IDE environment as far as I can see. Parts of the Hall library are implemented but other parts are missing.
I can configure the peripherals but can't attach an Interrupt handler because the NVIC vector table is fixed in Rom.
I tried to use use ISR calls like ADC1_IRQHandler and TIM4_IRQHandler being predefined function names in a HAL IDE environment but under arduino IDE these are considered new function names and their addresses don't match's with the fixed vectors in the fixed NVIC vector table. A call to a while(1) for ever function is called.
Question does any one can help me how use TIM and ADC interrupts under arduino STM32 IDE. How do I solve this problem ?
Have you asked in the STM forums? If so please provide a link to any threads that you started, in order to avoid duplication of effort. There is good support for the ADC, with examples, in the example library that comes with STM32 core. In fact it is much more feature rich than the AVR implementation.
Maybe this tidbit from the interrupt driven example will whet your appetite:
myADC.attachInterrupt(int_func, ADC_EOC);
With the timers, I see what you mean. I wish I could help, but I haven't dealt with that problem.
Interesting timing (pun not intended) as I've also been looking into this, this week.
There's a discussion on this topic here:
There's a lot to wade through. By closer to the bottom things get more interesting and applicable, it seems. I see there's a HardwareTimer.h and I'm digging through that file now. You will probably also want to look at the stm32f1xx_ll_tim.h file for more register info.
Do please let us know how you're making out. I can't imagine we're the only ones struggling with this, and this discussion is likely helpful to have in the forums.