Hard Fault Using FFT in TWR-KM34Z50M

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Hard Fault Using FFT in TWR-KM34Z50M

960 次查看
martinzhang
Contributor III

Hi,

I am trying to use the FFT library (meterlibFFT_cm0p_mmau_iar.a, version 4.0.0.2) in TWR-KM34Z50M, I have do following initialization before I call function METERLIBFFT1PH_Interpolation.

METERLIBFFT1PH_InitParam

METERLIBFFT1PH_SetCalibCoeff

METERLIBFFT_SetEnergy

METERLIBFFT1PH_InitAuxBuff

Also I noted the sampling values have been put in the buffer using following function:

METERLIBFFT1PH_InitMainBuff

But there is a hard fault error come out when the program running in METERLIBFFT1PH_Interpolation. Could someone tell me what happen and how I can solve this problem?

Thanks!

Martin

0 项奖励
回复
3 回复数

741 次查看
martinzhang
Contributor III

Hi Xiangjun,

Now I found the problem maybe I used the wrong MCU, MKM34Z128C does not have a MAC. According AN4255, the FFT library needs: Higher computational power of the MCU (a 32-bit MAC unit is required).

Thanks for your help!

Martin

0 项奖励
回复

741 次查看
martinzhang
Contributor III

Hi Xiangjun,

The MCU used in my project is MKM34Z128C, I cannot find any description of FPU module in the manual, so I am not sure it must  be initialized.

The attachecd project has the problem I mentioned before.

Thanks!

Martin

0 项奖励
回复

741 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Martin,

Regarding your question, maybe the wrong Kinetis configuration leads to the issue, for example, you do not initialize the FPU module before you use float type variable.

can you develop an simple example which can duplicate the issue, and paste the project here so that we can debug it.

BR

Xiangjun Rong

0 项奖励
回复