2016-06-28 08:39 AM
I wish to transfer a large array of data to 8 output pins that are all on the same port. E.g. a 500 element 8bit array where each bit of each element represents the pin status.
So 500 independent transfers to the port would be required.I have been looking through the examples that ST have but none of them seem to do this.There seems to be a lot of 'DMA to PWM' examples which transfer to a pin that has a timer connected to it but this isn't useful to me since I want to transfer to a whole port.How would I do this? Are there any examples similar to this which I could modify to my need?Thanks2016-06-28 08:54 AM
Maybe this can help.
https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/DispForm.aspx?ID=613912016-06-28 09:49 AM
The exact implementation is STM32 model/family specific, but I've posted several dozen examples to the forum over the years. The search here is awful, try Google.
2016-06-28 11:38 PM
that guy uses PWM as well.
Also, Clive, I have found code that's exactly what I need in terms of what it does but it uses peripheral stuff and I have no idea how most of those functions translate to HAL unfortunately. So I don't think stuff thats very old will be of use to me.This is it here.https://github.com/Frans-Willem/LEDMatrixHUB75/blob/master/F4Matrix/src/matrix.c2016-06-29 01:33 PM
I tried editting the simple DMA example in STM32Cube_FW_F7_V1.4.0\Projects\STM32F746ZG-Nucleo\Examples\DMA\DMA_FLASHToRAM
I changed the DMA direction register so its memorytoperipheralinstead of memorytomemory. And I changed the destinationmemory address to one of the GPIO ports.For some reason its not working though. The GPIO pins aren't being written to at all.Here's the editted example code:http://ideone.com/h1EJBr2016-06-30 06:45 AM
actually that was the wrong link i gave sorry
I got it working. It wasn't working was because i had DMA_MEMORY_TO_PERIPHERAL instead of DMA_MEMORY_TO_MEMORY Even though the former way is obviously the correct way. Could this be a bug?