On the second, and only the second, iteration of the while loop of the attached file the call to malloc causes an exception with EXCAUSE 24. This means a data misalignment error. It works fine on the first iteration. I do not understand why it does not on the second. The values of ADC.NTDR * N_CHAN_ADC have the same values on both iterations. The value of N_CHAN_ADC is a macro set by a #define statement which sets it to 8.
The processor is a BF547. This is a VDK project being developed with VisualDSP++ 126.96.36.199