Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHi!
Well great that it works. --- Quote Start --- - 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? --- Quote End --- Do you have a cache in your CPU? If so, the behaviour could be related to the cache, because you might be reading the values stored in the cache and not the actual data which are updated by the DMA. Greets