Systimer issue in XMC1300

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User22355
Level 2
Level 2
10 replies posted 5 questions asked 10 sign-ins

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-

  1. 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.
  2. 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.
  3. 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?

0 Likes
1 Solution
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

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

View solution in original post

0 Likes
2 Replies
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

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

0 Likes

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.

User22355_0-1640067863606.png

 

0 Likes