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.
I'm running high fast control loop which relies on CLA1 tasks and CPU1 ISRs running every 2.5us to update my HRPWM CMPA and CMPB registers. Like many others here have mentioned, I want to rely on SFO() for calibration but am worried about its impact on the control loop. I've found several clues scattered among other threads here, but I'd like to try and put together a more complete picture. There are two ways I'm aware of that SFO() can impact ISRs and CLA tasks:
1. SFO() accesses some of the ePWM registers. If the CLA task tries to access the ePWM registers at same time, it will stall since the CPU has priority over the CLA. The user reports delays up to 25ns (5 sysclk). No suggestion of an upper bound on this delay from TI. In that thread, Sal suggests a couple workarounds:
"You can use message RAMs. You can also use the MIRUN. The C28x can view the MIRUN register. If the CLA task is running, then the C28x should wait to access the PWM registers until the CLA task is complete."
I'm unsure of how these workarounds would work. Once SFO() is executed, how could one possibly instruct the cpu to "wait to access the PWM registers," since we cannot see or modify SFO()??
2. SFO() contains non-interruptible RPT instructions, which can increase the latency of ISRs on CPU1. User reported delays up to 100ns (25 sysclks). TI has suggested a bound of "10-30 cycles on estimate" or "about 20 cycles" (I assume these are sysclk cycles). No workarounds suggested.
While I know TI can't share many details on SFO(), I'm looking for some clear upper bounds on these latency numbers, and also assurance that there are no other routes for interaction that are being overlooked.
Regards,
Mike
Also PS: The "ask a related question" button does not function, otherwise I would have used it for this...
I will report the ASK RELATED button. Meanwhile I am looking at your question.
Once the power supply starts operating, it can't just halt the feedback loop while SFO() runs. My CLA tasks and ISR calls will never have more than a 2.5us gap between them. Based on information volunteered in this previous thread, an SFO() call can take up to 735 clock cycles before returning, which is much longer.
Okay I see what you mean. Let me ask our systems team how you have to design the system for this.
Nima
Mike,
Both engineers who know the answer are still on vacation. I will ping them again to see if they can help sooner.
Nima
Mike I am still researching a solution to this. I will get back to you as soon as I find an answer
Hi Nima, can I get an update on this? Are the expert engineers still unavailable?