Hard Fault Using FFT in TWR-KM34Z50M

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hard Fault Using FFT in TWR-KM34Z50M

806 Views
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 Kudos
Reply
3 Replies

587 Views
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 Kudos
Reply

587 Views
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 Kudos
Reply

587 Views
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 Kudos
Reply