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

조회 수: 1 (최근 30일)
Mike Buba
Mike Buba 2022년 2월 12일
댓글: Rajanikant Metri 2022년 5월 23일
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
Mike Buba
Mike Buba 2022년 5월 6일
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 2022년 5월 23일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Periodic Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by