Hello,
I’m working with Simulink and an STM32G4 series microcontroller. I’ve successfully set up PWM generation and configured the ADC in injected mode, synchronized with the PWM timer (TIM1).
However, when I enable External Mode in Simulink (for real-time parameter tuning and signal monitoring), the connection fails. Interestingly, everything works fine when I trigger the ADC using a different timer—the issue only occurs when TIM1 is used to trigger the injected ADC.
My setup:
- Target: STM32G4 (e.g., STM32G4)
- PWM generated using TIM1
- ADC in injected mode, triggered by TIM1
- External Mode communication over STLink (USB)
Question:
Is there a known limitation or conflict between External Mode and using injected ADC mode synchronized with PWM (via TIM1) on STM32 targets in Simulink?
Could this be related to timing/resource conflicts?
Do you have any suggestions or workarounds to maintain synchronized ADC injection while using External Mode?
Thanks in advance for your support!