Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C55xx DSPLib V2.40 maxvec bug.

If the maximum value is located at index 0 of the array, r_idx does not get set.

 

Easily reproducible.

int16_t data[200];

int i;

int16_t r_val = 0xAAAA, r_idx = 0xCCCC;


for( i = 0; i < 200; i++ )

{

data[i] = -1200 - i;

}


maxvec( (DATA *) data, 200, &r_val, &r_idx );

 

 

You'll see that while r_val gets set, r_idx does not, and retains its 0xCCCC value. I haven't gone through all combinations and machinations of data that will and won't fail, but my scenario is an array of length 200.  The entire array happens to be negative.  The first element in the array is the largest magnitude value in the array.  r_idx does not get set.