2024-11-27 03:41 AM - last edited on 2024-11-28 01:32 AM by Sarra.S
Purpose: We would like to implement timer input capture in DMA mode on STM32H723 platform without interruption.
Current Problem: Use Cube MX to configure relevant parameters, only use CH2 of TIM4 as the direct mode for input capture, select Reset Mode for Slave Mode, select TI2FP2 as the trigger source, and then generate the corresponding code.
The frequency measurement works, but only once, if the external input frequency decreases from 1000Hz to 500Hz, it can only reset the programme to run at full speed again to measure 500Hz again, otherwise it will always be 1000Hz. not sure what the problem is? I suspect the trigger source may not be configured correctly? Or do you have to switch on both CH1 and CH2 channels, one directly and one indirectly? Please refer to the attached file for the configuration.
Any guidance would be greatly appreciated!
*This post has been translated from Chinese to comply with the ST Community guidelines.
2024-11-28 01:37 AM - edited 2024-11-28 01:37 AM
Hello @xiefengtian, welcome to the ST Community,
I can’t see how you handle the DMA transfer complete interrupt from your shared code.
PS: we would find it much easier to include your code with </> rather than some snapshots in a doc file.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.