cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H563 DAC1

mccabehm
Associate III

I used CubeMX 6.12 to generate code and DAC output works as intended.

I cloned that project, migrated to CubeMX 6.13 and generated code. DAC output doesn't work. Migration to 6.13 also used FW H5 1.4 instead of 1.3.

Comparing stm32h5xx_hal_msp.c I see the 6.13 generated code lacks

RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
if(hdac->Instance==DAC1)
{
  /* USER CODE BEGIN DAC1_MspInit 0 */

  /* USER CODE END DAC1_MspInit 0 */

  /** Initializes the peripherals clock
  */
  PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_DAC;
  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  {
      Error_Handler();
  }
}

in HAL_DAC_MspInit(). When I add the above code to stm32h5xx_hal_msp.c in the migrated project, DAC output works as expected.

No significant differences between the IOC files.

Is there a problem with CubeMX 6.13?

Attaching STM32H563VIT6_2.ioc (original, CubeMX 6.12, DAC works) and NGC_HW_Verification_Clone.ioc (cloned, CubeMX 6.13, DAC doesn't work).

7 REPLIES 7
AScha.3
Chief III

What its doing, if you select using FW H5 1.3 again ?

If you feel a post has answered your question, please click "Accept as Solution".

I do not know how to revert a project to an earlier CubeMX and FW version. Using STM32CubeIDE v1.17

go : menu -> help -> configuration tool -> manage embedded...

then:

AScha3_0-1738954668597.png

select (green button) to delete...and select other version -> green = active is the most recent/newest.

So deselect 1.4  on H5.

btw

You see, i still use 1.11.2 H7 - why should i update, if everything i use is working fine ?

Just to find new errors...?

If you feel a post has answered your question, please click "Accept as Solution".
mccabehm
Associate III

I had to update to get correct VREFBUF handling for H563.

Deselecting H5 1.4 won't affect existing project. From what I've seen, this is only used when a project is created. The only H5 1.4 options are Refresh and Remove...

mccabehm_0-1738957252611.png

 

So you need to use v 1.4 ? (as i understand it...)

>From what I've seen, this is only used when a project is created.

try: open Mx view, then generate code . -> compile and check it...

 

If you feel a post has answered your question, please click "Accept as Solution".

Hello @mccabehm ,

First let me thank you for posting.

Your request is under investigation, and I will get back to you ASAP.

Thanks.

Mahmoud

Hello @mccabehm @AScha.3 ,

 

Thank you for reporting this issue.

I am escalating an internal ticket to the concerned Team (ticket number: 202681).

 

Best Regards.

Mahmoud