Page 1 of 1

TIMx_CCMR1 register problem

Posted: 14 Apr 2020 11:30
by devrim
I am using mikrobasic for ARM and trying to use CCP module of STM32072CB.
Compalier not access to TIMx_CCMR1 register. It is giving error .
Is that compalier's fault or mine?
thx

Re: TIMx_CCMR1 register problem

Posted: 14 Apr 2020 12:28
by AntiMember
STM32F072CB.c
sbit CC1S0_TIM15_CCMR1_Output_bit at TIM15_CCMR1_Output.B0;
sbit CC1S0_TIM15_CCMR1_Input_bit at TIM15_CCMR1_Input.B0;

Re: TIMx_CCMR1 register problem

Posted: 26 Dec 2020 14:29
by devrim
Hi,
Thanks for your reply,
I have same problem with stm32L443rc .
I can not use PWM function. Compiler giving error at PWM_TIM2_Start lib. (pwm problem.png)
And also giving error with TIM2_CCMR1 register. (ccmr1 problem.png)
How can I solve this issue? Please do not fotget I am using Basic compiler.

Thanks

Re: TIMx_CCMR1 register problem

Posted: 29 Dec 2020 09:37
by filip.grujcic
Hello,

For your first question you can refer to the post by AntiMember. Same applies to the STM32L443RC -- TIM2_CCMR1 is an incomplete name, press Ctrl + Space while having the cursor on TIM2_CCMR1 to see the names of the defined registers.

As for the second question, the module structure is called _GPIO_MODULE_TIM2_PA0, therefore your function should be PWM_TIM2_Start(_PWM_CHANNEL1, @_GPIO_MODULE_TIM2_PA0)

Regards,