2022-03-29 11:58 PM
I'm generating a sine wave with DMA and DAC.
Bare metal coding i'm able to reach 20 khz wich is the frequency i need.
Introducing touchgfx and freertos i'm not able to reach over 1 khz.
lowering the number of samples of the sine wave for the dac i'm able to rise the output frequency but not high as expected.
Does touchgfx introduce different priorities for timers or timer source?
I found a bug that the CubeIDE generates the DMA_Init() function afer the DAC_Init() so switching that resolved DAC totally not working.
Now i'm faced with the problem i described in th previous lines.
The TouchGFX engine calls some FreeRTOS tasks that via HAL functions activate the dac and generates the waves.
Thank you, any help might be useful.
@Alexandre RENOUX
@Romain DIELEMAN
2022-03-30 01:26 AM
Hello @Riccardo Franceschetto
Did you try to use TouchGFX without OS and see if the issue still occurs ?
If you don't do anything on the display while running the DAC, I believe you should be able to reach 20 KHz.
Why TouchGFX is calling the DAC ? Can you explain a bit more what you are trying to do with your UI and your hardware ?
/Alexandre
2022-03-30 01:44 AM
Thanks Alexander,
I'm tryng to generate different frequancy sine waves.
TouchGFX provides a list of different frequency sine waves to generate.
Then after user selection, via the view, presenter, model scheme, a message is loaded in to a queue, a FreeRTOS task is listening for messages in the queue and when the message with the signal selection is arrived, serves the command and clears the queue, the task uses HAL libraries to generate the wave on the DAC via DMA.
I haven't tried using TouchGFX without os, the TouchGFX is not working on images while the wave is generated.
I'm using STM32f429IIT on a custom board with LTDC on 4.3" TFT LCD and SDRAM.