F28379D: one part of the code behaves differently in External mode

3 Ansichten (letzte 30 Tage)
Mike Buba
Mike Buba am 12 Feb. 2022
Hi,
I am testing a bespoke control code on TI ControlCard F28379D and working on a protection part. It seems one part of the code behaves differently when I am running the application in External mode.
I am sending a measured signal and limit to SR flip flop. If the value is higher than the limit, I should latch the error and block pulses. The same code is used for current and voltage, as shown in the figure. To test, I am sending signals to digital outputs and recording them on the oscilloscope.
On the scope, the first SR flip-flop output is oscillating (GPIO 67, PIN 132, Ch4), although both inputs are zero (LOW) (GPIO 36 and GPIO 35 (Reset), Ch1 and Ch2). For the second SR flip-flop inputs are also zero (LOW) and the output is zero (LOW), as it should be. I have not uploaded that case.
Oscillation is 2.5kHz. My sample time is 5kHz.
When not in External mode, there is no oscillation and the SR logic works ok, i.e. as expected.
Is there any explanation behind it and what can I do to fix it?
  3 Kommentare
Mike Buba
Mike Buba am 6 Mai 2022
Hi Rajanikant,
what I deduced from my tests is that MATLAB adds part of the code on top of your application when you select External mode. That would explain (at least to me :) ) why part of the code is not executed, i.e., there must be an overflow or overrun or just not enough time to execute all the code in that cycle.
When I increased the application sample time, all the code worked ok.
I am not sure why just this part of the code didn't work, but I noticed that issue on the signals around SR flip flop or Switch blocks.
Rajanikant Metri
Rajanikant Metri am 23 Mai 2022
Hi Mike Buba,
Thank you for your response. How do we come to know that 'part of the code is not executed' or overflow or overrun?
And how much Sample time you kept?
I tried with Clock Frequency from 2.5kHz to 20kHz and accordingly changed the sample times, but not getting the results from SR flip-flop when it is connected in the Boost converter circuit.
I checked the truth table of SR flip-flop in isolation mode, it is working properly. The problem is, when its in the circuit with application.
Thank you.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Periodic Waveform Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by