AnsweredAssumed Answered

STM32 CubeMX bug tracker/feature request

Question asked by sinitsin.artyom on Mar 29, 2016
Latest reply on Apr 12, 2016 by STM32Cube-T
Is there some bug tracker or feature request branch on forum? How can I leave feedback for this software?

Anyway, here I'll post my proposition.
CubeMX generates initialization of periphery like this:

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_DMA_Init();
  MX_I2C3_Init();
  MX_USART2_Init();

  /* USER CODE BEGIN 2 */

But sometimes I need to place code BEFORE before, for example, MX_DMA_Init() but after this block


  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();


My real example: I have MPU6050 MEMS accelerometer/gyro. And it does not have reset pin. Due to that this is I2C device, it have one problem as "I2C lockup". The one possible solution is reconfigure I2C pins as push-pull and toggle clock pin until device becomes free. I've placed this procedure after
MX_GPIO_Init();
But every time when CubeMX regenerate code, it clears my code, because there are no "use begin-end" block.

My proposition is place additional user begin/end blocks there.

Outcomes