'C After filling buffers with data, strange data appear

Buy debugging through SWD on STM32F746NG and putting break point in last line of the code below:

uint16_t data[128];
q15_t ref[64];
q15_t in[64];
.
.
.
for(uint16_t ii=0;ii!=63;ii++)
  {
    ref[ii]=data[ii*2+1];
    in[ii]=data[ii*2+1];
  }


  // 3.LMS processing
    arm_lms_q15(
            &myLMS,
            in,
            ref,
            dummyOut,
            error,
            nsamples
            );

  // 4.Visualizing errors
for(uint16_t bytecount=0;bytecount!=64;bytecount++)

Obviously all elemnt of ref and in must be the same but the last elemnt of these are not the same. the last element of data is 2617 bu is -15581 on ref and 2409 on in. The question is how to remove this data corruption in last element?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source