2019-06-27 10:37 AM
Hello,
I tried to use tim2 in my firmware but in CubeMX when TouchGFX is enabled tim2 is disabled..
In TGFX tab there is a parameter "Timer for Instrumentation" where I can choose between timer 1, 3, 5, 8 and 12, but is it doesn't affect tim2.
Is possible to use tim2 when I'm using TouchGFX?
"Timer for Instrumentation" is used for what?
Regards.
2019-06-28 01:17 AM
Hi @eng23,
Can you show me a screenshot of that? It's not disabled for me (F7 based project).
Thanks,
/Martin
2019-06-28 03:28 AM
Hi @Martin KJELDSEN ,
Of course, here is the screenshot:
If I disable TouchGFX Middleware TIM2 is available to use.
Regards.
Anderson
2019-07-02 01:08 PM
Hi @Martin KJELDSEN ,
Any guess about this issue?
Regards,
Anderson
2019-07-02 11:57 PM
Hi @eng23,
I see what you mean now. I'm pretty sure i've been able to select it in earlier versions, but i cannot in recent ones. CubeMX does suggest that it's already in use by some other component in TouchGFX, but it's not something i can make sense of. I'll try to dig deeper.
2019-07-03 12:02 AM
The only Timer we use from CubeMX is for MCU instrumentation and this is set to 1 by default (For F7). And i still cannot enable TIM2 for anything. I think this may be a bug in CubeMX.
/Martin
2019-07-03 09:19 AM
Hi @Martin KJELDSEN ,
Ok thanks for feedback. I will try implement manually and verify if it works.
Regards,
Anderson
2019-07-03 11:26 PM
Okay, let me know how it goes!
2019-10-28 02:51 PM
Sorry to revive an old issue. I am just starting to dig into this exact problem and was wondering if there was any new information regarding it. I've been able to verify that after calling touchgfx::touchgfx_init(); that there is a change to the TIM2 ARR register. It is set to 0xFFFFFFFF. No other register is changed however and after allowing TouchGFX to run for sometime and pausing execution I can see that the ARR register is set to 0 again. It seems strange but it also seems as if the timer is not in use by TouchGFX and should be fine to use. Do you have any thoughts on this @Martin KJELDSEN ?
Thanks!
Don
2019-10-30 04:44 AM
Hi @DWeie
I'm using TIM2 to other things. It is not possible to init TIM2 by Cube, because TouchGFX doesn't allow, but in fact TouchGFX doesn't use TIM2.
So the solution is init TIM2 manually.
Regards