2021-05-05 12:42 PM
Trying to use CubeMX v6.2.1 to put timer 2 channel 1 in "OC CH1" mode to pin 77. It looking like pin 77 do not configure to output mode by CubeMX and cannot generate. If I use "OC CH1 no output" with interrupt enabled and preconfigured, the pin signal is OK.
Possible points: 1. Pin77 have default function JTDI, but I use SWD (and checked it in CubeMX). 2. This pin share the functions "TIM2CH1" and "TIM2_ETR". However, I set the pin 77 in "TIM2CH1" mode.
Need help.
2021-05-06 06:54 AM
Works fine for me. Must be something else in your configuration.
2021-05-06 07:21 AM
Yes, it looks right in CubeMX, but actually in my PCB it does not work. Pin 77 got in reset state and cannot generate. If you have the board with STM32F103VET6, can you please check the pin 77 behavior ander the OC output mode with the following config. To start generate I use HAL_TIM_OC_Start(&htim2,TIM_CHANNEL_1) function. Pin 77 stay in reset state.
2021-05-06 07:23 AM
2021-05-06 08:04 AM
2021-05-11 11:40 AM
This story to be continued. I have a remapping conflict between TIM2CH1 and SPI1. Both peripheral are remapped as shown in IOC file included. Unfortunetely, CubeMX do not manage this remapping issue and do not warn the user. the SPI1 and TIM2CH1 fight for pin77! Those peripherals cannot to win!
The question is: how to prevent this issues it the future projects?
2021-05-11 11:42 AM