Hello,
I have TM4C129ENCPDT and a project of sinewave inverter with some peripherals.
I am generating the sinewave by means of a periodic HWI timer-called function.
My problem is, however, that I miss about 30% of the samples because there are other HWI sources with the same priority which is 224. Here highest number is the lowest priority. Thus, my sinewave is inaccurate which causes problem in mainly hitting saturation of the output transformer and increased THD.
I can lower the priority of the hwiCAN (which handles received CAN-bus messages) but then, of course, I miss even more sinewave PWM samples. What I need is to lower the priority of the timer I use to call the sinewave generator.
The timer is specified in the .cfg file>
// Create sineTimer as source of Hwi var timerParams = new Timer.Params(); timerParams.startMode = Timer.StartMode_AUTO; timerParams.runMode = Timer.RunMode_CONTINUOUS; timerParams.period = 72; // in microseconds Program.global.sineTimer = Timer.create(Timer.ANY, "&sinetimer", timerParams);
Also, the other weird thing is that the HWI consumes about 32% of the CPU time, the other 2 tasks about 0.3% and 1% but the total CPU load is about 46%.
Thanks in advance for any clue.