2025-02-07 10:23 AM
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).
2025-02-07 10:31 AM
What its doing, if you select using FW H5 1.3 again ?
2025-02-07 10:46 AM - edited 2025-02-07 10:50 AM
I do not know how to revert a project to an earlier CubeMX and FW version. Using STM32CubeIDE v1.17
2025-02-07 11:00 AM - edited 2025-02-07 11:02 AM
go : menu -> help -> configuration tool -> manage embedded...
then:
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...?
2025-02-07 11:41 AM
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...
2025-02-07 11:57 AM
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...
2025-02-10 03:17 AM
Hello @mccabehm ,
First let me thank you for posting.
Your request is under investigation, and I will get back to you ASAP.
Thanks.
Mahmoud
2025-02-10 06:28 AM