TIMx_CCMR1 register problem

mikroC, mikroBasic and mikroPascal for PRO ARM® MCUs, supporting STM32, Tiva, Kinetis, & CEC devices
Post Reply
Author
Message
devrim
Posts: 17
Joined: 17 Oct 2014 12:14

TIMx_CCMR1 register problem

#1 Post by devrim » 14 Apr 2020 11:30

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
Attachments
arm_fail.png
arm_fail.png (28.52 KiB) Viewed 2620 times

AntiMember
Posts: 136
Joined: 02 Jan 2020 19:00

Re: TIMx_CCMR1 register problem

#2 Post by AntiMember » 14 Apr 2020 12:28

STM32F072CB.c
sbit CC1S0_TIM15_CCMR1_Output_bit at TIM15_CCMR1_Output.B0;
sbit CC1S0_TIM15_CCMR1_Input_bit at TIM15_CCMR1_Input.B0;

devrim
Posts: 17
Joined: 17 Oct 2014 12:14

Re: TIMx_CCMR1 register problem

#3 Post by devrim » 26 Dec 2020 14:29

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
Attachments
ccmr1 problem.png
ccmr1 problem.png (32.14 KiB) Viewed 1856 times
pwm problem.png
pwm problem.png (24.95 KiB) Viewed 1856 times

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: TIMx_CCMR1 register problem

#4 Post by filip.grujcic » 29 Dec 2020 09:37

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,
Filip Grujcic

Post Reply

Return to “ARM PRO Compilers”