STM32H563 DAC1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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).
Solved! Go to Solution.
- Labels:
-
STM32H5 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-10 6:28 AM
Thank you for reporting this issue.
I am escalating an internal ticket to the concerned Team (ticket number: 202681).
Best Regards.
Mahmoud
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-07 10:31 AM
What its doing, if you select using FW H5 1.3 again ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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...?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-10 3: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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-10 6:28 AM
Thank you for reporting this issue.
I am escalating an internal ticket to the concerned Team (ticket number: 202681).
Best Regards.
Mahmoud
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-13 7:56 AM
CubeMX 6.13 DAC1 configuration...
CubeMX 6.12 configuration...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-13 9:22 AM
Good DAC output...
Bad DAC output...
Amplitude is ~6v because of an op-amp downstream of the DAC1 channel 1 MCU pin. Scope trace taken at the MCU pin looks the same, except amplitude is ~2.5v.
I am unwilling to supply more information related to this issue. CubeMX 6.12 generates this required initialization code for the DAC
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_DAC;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
CubeMX 6.13 does not. The DAC will not work without a clock. If this is not sufficient to identify the problem, I am sorry. I am using the DAC untriggered, probably not normal. My requirement for DAC frequency is very low (< 20 Hz) so I don't need SW or HW triggering yet. This issue is also documented in https://community.st.com/t5/stm32-mcus-products/stm32h563vit6-dac1-output-unexpected/td-p/769306 and presents similar info.
