Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHi Pilleman!
Thank you very much! With your suggestion the DMA works! But the behaviour of the program is so strange: - if I declare alt_u8* buffer in the main, I read teh correct typed values from the buffer - with the command printf("addr(0x%X) = %c \n", &buffer[0], (char) buffer[0]); - if I declare buffer with malloc: alt_u8 *buffer = malloc(BUFF_SIZE * sizeof (alt_u8)); (I change only alt_u8* buffer with this line) - I read wrong values from the buffer -if I delcare alt_u8* buffer as a global variable - I read the wrong values from buffer - if I use alt_u8 buffer[BUFF_SIZE] instead of alt_u8 *buffer - I read the wrong values from buffer Why?! My DMA don't use the Burst and I use Quartus 9.1 sp2 and Nios SBT 9.1. It's possible that it's a compiler problem?