Part Number: EK-TM4C123GXL
Tool/software: Code Composer Studio
Hello, I have a question regarding how to improve execution time performance in Code Composer Studio code.
First, some background information on this project.
- My teammates and I are trying to create a microcontroller-based device that can cross-correlate two signals together.
- We are cross-correlating an array filled with data from the ADC with an array created through software (called the analyzing array).
- Each array is 4096 elements large.
The problem is that execution times are very poor for the cross-correlation, taking up to a minute and a half to complete a cross-correlation operation. My team and I have tried various fixes, to no effect.
- We tried reducing the magnitude of the values inside the ADC data array. In other words, we tried reducing the value in each array element from 2500 down to about 50. This did not affect the run time.
- The ADC data array holds unsigned 16 bit integers (uint16_t). I thought that this might be an issue, so I cross-correlated the analyzing and data arrays together, with both arrays created through software. With the data array holding 16 bit integers and the analyzing array holding 8 bit integers, the cross-correlation was successfully completed in just a few seconds. So, the array data types do not seem to affect the run time.
- I have set the optimization level to whole program optimizations.
Are there methods for improving this execution time? Are there problems with the ADC that might slow down the microcontroller?
