1 of 1 people found this helpful
1. We are getting build errors with your project "arm_const_structs.h" and "fix_fft.h" are not available in the project. Can you please fix these errors and send the project again? Also, can you please tell us the steps to reproduce the issue?
2. You are calling I2C_1_Start() in the for loop. Ideally I2C component should be started only once and that is during initialization. Can you please remove this line and test once?
3. In the ADXL345_ReadReg() function you are Writing through the I2C as well as reading through the I2C. Can you please tell us the reason for this?
4. For now, can you please remove the I2C part from your application and check only the FFT part?
5. Please have a look at the attached code example which uses and includes the CMSIS DSP library, this library has many mathematical functions, FFT , filters , statistical functions , all optimized for ARM Cortex M0.
I managed to fix my project and get the result FFT in real time. Basically, i changed my input data type into float so that i can use arm_cfft_f32 function.
1. I already removed fix_ftt.h since im not using it anymore. For arm_const_structs.h, I download CMSIS library and include in the build setting. You can refer to this link https://www.cypress.com/comment/300971
2. Thank you for your suggestion, i already removed it. I called it only one this time.
3. I'm fairly new to PSoC thus i refer to this video from youtube for I2C communication. PSoC4 I2C & UART Tutorial: Reading Over I2C - YouTube
4. Since i managed to get the result what i want, thus it is unnecessary to remove it.
Thanks for your help.