- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using the BUCK_PCC_FIX_FQ to build a custom application. I would like to add some supervisory control which is executed periodically using systimer. I have enabled the soft start function as it provides the DAVE configs for systimer.
I have added additional systimers where I perform these tasks and blink LEDs. The controller is enabled by setting a flag (variable).
The issues and the scenarios I am facing are listed below-
- All functions work as expected up to switching frequencies of 240 kHz, but when the switching frequency is increased beyond, the systimers slow down and the LEDs start blinking slowing. Once the flag is reset, the LEDs starting blinking at the correct rate. As, switching frequency is increased, I ensure that the control loop divider is increased as well to ensure the interrupt has enough time to be served.
- When the switching frequency is increased to 300 kHz, upon turning on the controller, only the controller ISR works but the systimers stop working and the LEDs donot toggle anymore.
- When I disable all the systimer functions and run the controller on startup, the controllers works fine.
The controller is the XMC1302, 64 kB.
What could be the cause of the issue? If not, how can I debug and fix this?
Solved! Go to Solution.
- Labels:
-
XMC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @User22355,
Please make sure the following:
- Optimized compiler setting for better performance Go to: > Project > Properties > C/C++ Build > Settings > ARM-GCC C Compiler > Optimization
1) Select "Optimize most (-O3)" for better performance - Please make sure you are not taking much time within ISR as callback execution rate will increase based on the PWM frequency.
- Please ensure execution time is lesser than PWM frequency.
Could you please share your project if it is ok for you, so that we will try to reproduce the issue at our end
Thanks,
Krupashankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @User22355,
Please make sure the following:
- Optimized compiler setting for better performance Go to: > Project > Properties > C/C++ Build > Settings > ARM-GCC C Compiler > Optimization
1) Select "Optimize most (-O3)" for better performance - Please make sure you are not taking much time within ISR as callback execution rate will increase based on the PWM frequency.
- Please ensure execution time is lesser than PWM frequency.
Could you please share your project if it is ok for you, so that we will try to reproduce the issue at our end
Thanks,
Krupashankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Krupashankar,
You are right. The issue was the that the ADC reads (for Vin, Iin, etc) which happens every PWM interrupt (and not every control interrupt), was increasing the duration of the interrupt. Once I omitted this, I was able to work at higher switching frequency.
Would it be possible to modify the DAVE app such that it generates code where the ADC reads happen only when the control loop is executed?
I have attached the image for clarity.