各位
好!
SineWaveGenerationUsingPWMWithHercules™N2HET
andHTU 指导文档中的方法 HTU 响应不了,请问指导文档哪个地方错了!
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.
各位
好!
SineWaveGenerationUsingPWMWithHercules™N2HET
andHTU 指导文档中的方法 HTU 响应不了,请问指导文档哪个地方错了!
各位,关于HTU,另外参考下这个问文档,还不错:
http://www.ti.com/apps/docs/litabsmultiplefilelist.tsp?literatureNumber=spna130a&docCategoryId=1&appId=209&keyMatch=spna130a&tisearch=Search-EN-Everything
This application report shows how the high-end timer transfer unit (HTU), a local DMA on the TMS570 and RM4x devices that is dedicated to the extremely versatile programmable timer co-processor (NHET), can be used to offload tasks from the main CPU by doing transfers between the main memory and the NHET. It shows how to set up the HTU, covers specific details that need to be taken into account when using the HTU, and lists the benefits of using HTU for data transfers instead of the CPU.
uint32_t filter(unsigned int input) //SW for filter algorithm, arithmetic average filter
{
uint32_t count;
uint32_t avrg;
int32_t avrg_temp;
int32_t temp;
// double pwm_duty;
sum = sum -ADC_Buffer[0]+ input;
for(count=0;count<(N-1);count++)
{
ADC_Buffer[count]=ADC_Buffer[count+1];
}
ADC_Buffer[9]=input;
avrg=(uint32_t)(sum/N);
if(avrg<31) avrg=31;
// pwm_duty=(double)((avrg-31)*640000/4020);
// temp=(uint32_t)(avrg/26)*pwm_interval;
temp=(int32_t)(avrg-31)*640000/4020;
return temp;
}
这个滤波函数里的。
这个滤波算法你看懂了没,只取最近的十次。也就是先进的先丢弃。
最新的十个数相加然后平均值。
该平均值保证最小为31,
高于31的部分。
可是这个31是什么?
get pwm duty circle number
这个周期数是啥,应该跟这个设备的使用无关的一个东西,楼主不用管他这个算法是干啥的。