Hello,
I have a question on the InstaSPIN Projects and Labs.
Specifically it is on Lab10a (Overmodulation) and Lab10c (Lab10a with fpu32).
I have found out that the mainISR() has some difference between Lab10a and Lab10c.
--------------------------------------------------------------------------------------------------------------------------
1. The code snippets in mainISR() of Lab10a are as follows:
if(measurableShuntThisCycle > two_phase_measurable)
{
gAdcData.I.value[0] = gIavg.value[0];
gAdcData.I.value[1] = gIavg.value[1];
gAdcData.I.value[2] = gIavg.value[2];
}
My analyses for this code snippet are as follows:
(1) The variable of measurableShuntThisCycle has the data type of enumeration. The constant of two_phase_measurable is equal to 2 while all_phase_measurable is equal to 1.
(2) Therefore the above-listed code snippet may not be executed most of times unless overmodulation is activated for high load current. Here my PCB has the configuration of three low-side shunt current measurement.
2. Meanwhile the code snippets in mainISR() of Lab10c are as follows:
if(ignoreShuntThisCycle > use_all)
{
gAdcData.I.value[0] = gIavg.value[0];
gAdcData.I.value[1] = gIavg.value[1];
gAdcData.I.value[2] = gIavg.value[2];
}
My analyses for this code snippet are as follows:
(1) The variable of ignoreShuntThisCycle has the data type of enumeration. The constant of use_all is equal to 0.
(2) Therefore the above-listed code snippet is always executed.
---------------------------------------------------------------------------------------------------------------
Please comment on my analyses for these code snippets.
Why do Lab10a and Lab10c use the different mainISR() function in association with the above-listed code snippets?
Thank you for your guidance.
With regards,
JS Yoo