This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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
That's right. The lab10a used the update algorithm, but lab10c didn't do this. You might refer to lab10a if you want to use the over-modulation function.
Hello Yanming Luo,
I appreciate your guidance.
This issue has been resolved.
With regrads,
JS Yoo