Part Number:TMS320F28062
The code initially ran normally in RAM, but after configuring FLASH to run, an ADC sampling abnormality occurred.
(Compared with Voltage1, 2 when running in ram before, the sampling value is too large), resulting in the calculated three-phase Ia/b/c current being too large. After clak transformation and park transformation, the ID/IQ calculated by the current loop PID is entered. The actual value of the current is too large, resulting in a large error. The accumulated value of the integral term directly reaches the integral limit value. The current loop PID solution is abnormal, causing the current loop to fail to operate normally.
At present, the problem of slow running speed of the current sampling function in FLASH can be eliminated, because the current sampling function has been moved to RAM for running, and the actual measurement running time is indeed shorter than that in FLASH.
Ben Qin:
你好,为了更好的解决您的问题,我将咨询相关资深工程师,一旦得到回复将立即回复您。
,
?? ?:
好的,麻烦您了
,
Ben Qin:
不客气
,
Ben Qin:
参考下工程师的回复:
Do you put the control ISR and the ADC reading function to ".TI.ramfunc"? By doing this, the critical functions will be copied to RAM from Flash at the beginning of the program and eliminate the timing that needs to access Flash. You can refer to the universal motor lab project, in which you may find there is an extra statement: #pragma CODE_SECTION(motor1CtrlISR, ".TI.ramfunc") and "HAL_readMtr1ADCData" which reads the ADC signal as an inline function.
,
?? ?:
收到,感谢