cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX for STM32F746-DISCO, TIM5 channel4 misleading generated code

jose luu
Associate III
Posted on February 27, 2016 at 01:00

Using channel4 of TIM5 sets up ARDUINO_PWM_CS_D10_Pin where actually the

signal is on D5

ARDUINO_PWM_CS_D10_Pin is defined as pin PI_0 which is the correct pin however.

------------- so I am expecting generated code to be:

in mxconstants.h

&sharpdefine ARDUINO_PWM_D5_Pin GPIO_PIN_0

&sharpdefine ARDUINO_PWM_D5_GPIO_Port GPIOI

in tim.c

    /**TIM5 GPIO Configuration    

    PI0     ------> TIM5_CH4 

    */

    GPIO_InitStruct.Pin = ARDUINO_PWM_D5_Pin;

---------- also TIM1_channel1 generated code  attempts to use the D5 pin, it is likely to have the converse problem

#stm32f746-cubemx
1 REPLY 1
jose luu
Associate III
Posted on February 27, 2016 at 17:17

Actually, it is the STM32F746-DISCO documentation  UM1907 User Manual which is incorrect.

For instance, page 21, connector CN4, one line says:

TIM1_CH1 PA8 D5 pin6

whereas it should state:

TIM5_CH4 PI0 D5 pin6

I have also confirmed that on connector CN7, it should state

TIM1_CH1 PA8 D10 pin3

TIM2_CH1 and TIM3_CH1 are correct