Skip to main content
jose luu
Associate III
February 27, 2016
Question

CubeMX for STM32F746-DISCO, TIM5 channel4 misleading generated code

  • February 27, 2016
  • 1 reply
  • 516 views
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
This topic has been closed for replies.

1 reply

jose luu
jose luuAuthor
Associate III
February 27, 2016
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