cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up timers and toggling pins using CubeMx

Amir1
Associate II

Dear All

I am trying to use one of the timers on F303RE to toggle a pin at every count-up overflow event (let us say I need a jitter-free pulse). From CubeMx I get the impression that a GPIO pin can be associated with a timer and toggled by the event directly, that is without an interrupt. However, CubeMx does not seem to be generating the code that would be needed for setting the GPIO pins that have been associated with the selected timers. I have tried both Tim3 (associated with PA6) and Tim15 (associated with PB14), but no pulse appears at the pins. Again, I am not surprised because no code gets generated by CubeMx for setting the mentioned GPIO pins or for calling any TogglePin function. By contrast, I am seeing the code for setting GPIOA and GPIOC (for the LED and the blue button, respectively) as well as a HAL_GPIO_WritePin function for the LED), but nothing similar appears in the code for PA6 or PB14! I am not sure why this is the case.

Any insight will be greatly appreciated.

Amir

10 REPLIES 10
S.Ma
Principal

Check any errata document in case...