TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F28335: 28335上使用c2000ware的SGEN库时输出值与计算值不同

Part Number:TMS320F28335Other Parts Discussed in Thread:C2000WARE

在28335上使用c2000ware的SGEN库时输出频率与我的计算的理论值并不相同,问题如下,希望您能帮我解答:

1、根据指导文档sgen_mdl,我得到,输出频率=(Freq*step_max*Fs)/(2^16*2^15),计算方式,请问我总结的计算方式是否正确

2、在28335上使用SGENT_1时,Fs是多少,这个值是怎么算或者怎么看的

3、sgen.calc(&sgen),例程中的这个函数是如何保证数据按照指定频率出现的,该函数内部是否有阻塞机制,因为函数封装,我看不到具体实现过程 

          

Ben Qin:

你好,

1.输出频率参考上图freq

2.Fs默认是20khz

3.

其胜 官 说:我看不到具体实现过程 

这个我们也看不到。

,

其胜 官:

Is Fs 20Khz on 28335? Can this value be changed

,

Ben Qin:

我咨询资深工程师后回复您。

,

Ben Qin:

下面是工程师的回复:

The SGEN library has been archived and developers that developed the code is no longer in TI. But I'll try my best to answer your inquiry.

1. The parameter freq is in Q15 format, so the derivation of freq would be in (Freq/Max_Freq), or (Freq/(step_max*Fs))*(2^16*2^15). Note that both "Freq", "Max_Freq" is in Q16 format. This derivation expanded the Max_Freq to obtain the 2^16 multiplier, but "Freq" is still in Q16 format.

2.This Fs is determined by you and would be the part of calculation used for SGENT_1's freq and step_max.

3. I'm not too sure what you meant by frequency tunability, you can try modifying the freq and step_max parameter dynamically in your routine and presumably would result in producing a sine wave of different sampling frequency.

4.Do you mind disclosing the routine that you've used?

We also release all SGEN implementations in source code, sgt1c.asm for instance, describes how sgen.calc is used for SGENT_1. In SGEN the sine wave generation is based on look-up tables and the output would be scaled by the gain and offset.

"

 

I would also recommend the customer to use C2000Ware DCL's Reference Generator if possible. It is the new library that we actively support and in my view has a more intuitive design and thorough documentation. 

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28335: 28335上使用c2000ware的SGEN库时输出值与计算值不同
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1