AnsweredAssumed Answered

M0 GPIO with DMA max speed ?

Question asked by apuf.mac on Apr 16, 2015
Latest reply on Apr 17, 2015 by Clive One
Hi, I'm using an stm32f072 part, trying to toggle 8 GPIO pins with DMA from memory.
The DMA is plugged to a Timer (2) update event which has 48MHz using HSI48 (no crystal for now).

I have two issues currently :
- HSI48 seems to take a long time starting (well, registers say it starts quite fast but if I don't want a fault on GPIO setup I need to setup an empty loop (like for (volatile i=0;i<1000;i++); ) . Is this expected or is there an issue ? For space reasons I'm using CMSIS directly. But this one is not blocking.

- I achieve to output around 8MHz toggle speed (not exact value), but if I reduce the ARR value of Timer2, the GPIO toggle speed don't seem to be less than that.

Is it actually possible to toggle GPIOs with DMA faster than that  ? Would 12MHz be possible (chip main clock is 48MHz) ? Is there something to be wary of (using HSI, HSE ; different DMA event ... ) ? I can post the init code (CMSIS) if needed.

thanks a lot for your help, I tried to scout google and rereading the refman with no luck. Any ideas ?