2021-12-21 06:01 AM
Hello, i'm trynge generating a sine wave with DAC, on stm32f429ii, when it's coded baremetal everything works fine, when working with freertos the dac won't show any output.
May the timer tigger for the DAC goes to conflict with freertos?
2021-12-21 06:22 AM
Are we just guessing here? Does FreeRTOS use that timer for anything? If not, I don't see how there can be a conflict.
Step through code, verify things aren't getting hung up somewhere, verify tasks are working, verify register settings are correct. In this case I'd ensure the timer is working with DMA requests enabled and the DAC is working.
2021-12-21 06:42 AM
If you enable FreeRTOS, interrupt priorities change. This might cause issues.
hth
KnarfB
2021-12-23 02:59 AM
hi, thank you for your response.
I tried baremetal coding with
MX_TIM4_Init();
HAL_TIM_Base_Start(&htim4);
HAL_DAC_Start_DMA(&hdac, DAC_CHANNEL_2, (uint32_t*)Wave_LUT, NS, DAC_ALIGN_12B_R);
to generete a sine wave feeding a lookup table to the DAC and everything works fine so it's not hardware related.
Could the TouchGFX process interfere in some way?
When i got to work with freertos, calling this same code inside a task won't generate nothing at the DAC output, the timer 4 serves only the DAC.
I'm guessing is a problem of priority in the freertos, but i gave the timer level 5 priority, the highest it lets me select.
2021-12-23 03:00 AM
Thank you @KnarfB.
as i replied above to @TDK i guess thats the problem.
Do you have any raccomandation to follow to try solve the issue?