Skip to main content
hadi_bijari
Associate II
Nov 23, 2019 4:40 PM UTC
Question

hello every one. I need read ADC with 33.3 KHz by simulink to set GPIO output any suggestion

..

This topic has been closed for replies.

1 reply

Cyril FENARD
ST Employee
Nov 25, 2019 11:52 AM UTC

​Hi @hadi_bijari​  ,

You can start with a TIMER that starts ADC conversion at the desired rate.

Use also DMA that can help performance.

Then add a ADC block for end of conversion interrupt that can call a GPIO block.

At the end, check with an oscilloscope that the CPU frequency of the STM32 device you are using is fast enough to handle interrupts correctly.

Demonstrations are available in the STM32-MAT/TARGET tool for some parts of this use case (ADC, TIMER).

Regards.

Cyril