On Wed, Dec 3, 2008 at 04:15, Hennerich, Michael wrote: >>From: Mike Frysinger [mailto:[EMAIL PROTECTED] >>after changing it to 2^16 rather than 2^10, i get failures for small >>values of Y. bringing it back down to 2^14 and it seems to be OK ... >>or as the original code was written, 2^(16 - bit_size_shift). i.e. >>8bit transfers work for X of 2^16, but 16bit seems to work for 2^15 >>and 32bit seems to work for 2^14. >> >>the HRM states that X_COUNT value "must be 2 or greater" in two >>dimensional transfers, but it makes no statement about Y that i can >>see, and having X_COUNT of 0 should be fine (since it actually means >>65536). various tests here indicate that Y of 1 does not work either >>when doing a 2d dma ... > > Can you explain doesn't work? > Doesn't start?
never mind, just me doing bad math and not divining the meaning of the old code that was doing some subtraction with the 1024 constant in 16 and 32 bit transfers, we shift down the size by 1 and 2 bits. that means the size is no longer a multiple of 64k. so the inner loop needs to be shifted down accordingly so the X is always an even divisor. so a memcpy on 0x54320 becomes 32bit copy on 0x14000 ... this is not a multiple of 2^16 and forcing it to be one means 0x4000 elements are lost at the end. > Y_COUNT = 1 -> Do a 1D transfer instead. > I agree it would we nicer if it would behave like this. > I could imagine that the internal DMA engine's logic screws up. > > "The DMAx_Y_MODIFY value is the byte-address increment that is applied > after each decrement of the DMAx_CURR_Y_COUNT register. However, the > DMAx_Y_MODIFY value is not applied to the last item in the array on > which > the outer loop count (DMAx_CURR_Y_COUNT) also expires by decrementing > from 1 to 0" good point. ive tweaked the test to make sure the # of elements to transfer are greater than 0x10000 rather than 0xffff. this saves some register programming. -mike _______________________________________________ Uclinux-dist-devel mailing list [email protected] http://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
