LPC55S69 PowerQuad Example

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

LPC55S69 PowerQuad Example

1,840 Views
andrew_lonsdale
Contributor II

Hi,

I'm using the PowerQuad for FFT512 functions, and am using the example in AN12282 as a basis, however I am having some problems using the libraries that are released under the SDK as follows.

1) I tried to access the FFT function using the CMSIS call arm_rfft_init_q15() and arm_rfft_q15() both of which are remapped to the relevant PowerQuad function using the code in fsl_powerquad_cmsis.c. However I need to include the header file from the CMSIS code "arm_math.h" to make the structure arm_rft_instance_q15 available. This results in a compiler error because there is no FPU/DSP accelerator present. To get round this I access the PowerQuad driver functions directly.

2) I then need to calculate the magnitude of the complex result of the FFT. In the example this is done using arm_q31_to_float and arm_cmplx_mag_f32. However, this is not mapped to a PowerQuad function, nor does there seem to be an equivalent function in the current PowerQuad drivers.

I've also looked at the PowerQuad driver examples in the SDK which have been very useful, but these fall short of the required magnitude calculation.

Are there complete source code files for the examples in AN12282 so I can see where my error is, and are these examples based on a currently unavailable version of PowerQuad drivers?

Does anyone have any other suggestions?

Kind Regards

Charles

Labels (1)
0 Kudos
3 Replies

1,236 Views
andrew_lonsdale
Contributor II

Here is some further progress on this issue, which might help some folks:

I have upgraded to MCUxpresso v10.3.1 Build 2233, as the SDK Builder indicated that I need this. Interestingly, I was using v10.3.0 Build 2200, but checking for updates did not inform me that there was a later version.

I have also unzipped the installed SDK from within the IDE which has given me some arm libraries. I added one of these libraries by following the excellent guide here: https://community.nxp.com/docs/DOC-335465 

Note that when adding the library name you must omit the "lib" prefix and the ".a" suffix. So to add library libxyz.a, you enter "xyz" as the library.

I added libarm_ARMv8MMLI_math.a.

Sadly, I started to get VFP errors in the compilation, and I think this is because I have settings for hardabi in the tools and the library in the SDK uses softabi.  I think that this refers to whether or not floating point calculations are done in hardware or software and articles on the web suggest these shouldn't generally be mixed.

The SDK has only provided two arm libraries, neither of which recoginses that there is an FPU or DSP extension on core0. I think that the library I want is "arm_ARMv8MMLldfsp_math.a".

I have obtained this library from elsewhere, and my program compiles with a warning about 32-bit enums.

The code runs, but I am not seeing significant performance improvement between calculating the complex magnitude on the core and using the DSP extensions. Perhaps I'm not actually using them.

I'll continue to investigate.

0 Kudos

1,236 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Charles,

Thanks to reporting this issues, I will check it and inform the application team about it.

Best Regards,

Alexis Andalon

0 Kudos

1,236 Views
andrew_lonsdale
Contributor II

Regarding point 1. I now seem to have this working by putting #include "arm_math.h" at the end of my list of includes rather than at the beginning. The excellent powerquad_cmsis example helped here.

With the include as the first entry I get the following compile errors from core_cm33.h:

"Compiler generates FPU instructions for a device without an FPU (check __FPU_Present)"

"Compiler generates DSP (SIMD)  instructions for a device without a DSP extensions (check __DSP_Present)"

Even though these lines are excluded at compile time by the surrounding defines.

I tried moving the #include "arm_math.h" to the top of the list in the powerquad_cmsis example, and got the same result, so it looks like something odd is happening with the tools here.

Does anyone else get this odd result?

Regards

Charles

0 Kudos