ADC won't start after Cube upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-02 11:28 PM
Hi,
I have a project on Nucleo board with STM32U575ZIT6Q. I'm using STM32CubeIDE.
My ADC worked fine until i did this:
After migration HAL_ADC_Start function returns error.
When I generate code I use this setting:
What is wierd, is that if I unselect this box, and generate code then ADC starts to work again!
Since I need to have those files separate I have to use previous Cube version.
Is there something I need to do or this is a SW bug?
Thanks.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-08 1:37 AM - edited ‎2024-07-08 6:21 AM
Found the differences:
main() is the same and calls all functions in same order
both projects generate a warning about the SMPS when clicking generate, instructions unclear how to solve this
MMTAppRegionsCount differers, the "ok" has 0 regions enabled and the "nok" version has 3 regions enabled in the ioc file, but I see no difference in generated code
ProjectManager.CoupleFile=false in the ok version, true in not ok
MX_ADC4_Init() is the same
MX_GPIO_Init() is the same
MX_ICACHE_Init() is the same
HAL_ADC_MspInit() is the same
HAL_ADC_MspDeInit() is the same
HAL_MspInit() DIFFERS!
Line "HAL_PWREx_EnableVddA();" is not generated!
To me this is a bug. You can add HAL_PWREx_EnableVddA() in the user code section and that should fix it. Please let me know if that works.
ST needs to be aware of this. Please add bug-report tag to your start post.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-03 12:11 AM
Hello @S-E
First let me thank you for posting.
I would appreciate it if you could share your IOC, as this will help me investigate the issue.
THX
Ghofrane
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
‎2024-07-03 12:43 AM
Compare the generated code with a diff tool (git, diffmerge, winmerge, etc.) and tell us the difference. Do you have any user code sections or is your generated code unmodified?
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-03 4:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-05 7:35 AM - edited ‎2024-07-05 7:35 AM
Please upload both ioc files. I cannot compare one ioc file with itself and I cannot open the one you uploaded in V6.11.1. Upload the working one (V6.11.1) and the nonworking one (V6.12.0).
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-07 8:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-08 1:37 AM - edited ‎2024-07-08 6:21 AM
Found the differences:
main() is the same and calls all functions in same order
both projects generate a warning about the SMPS when clicking generate, instructions unclear how to solve this
MMTAppRegionsCount differers, the "ok" has 0 regions enabled and the "nok" version has 3 regions enabled in the ioc file, but I see no difference in generated code
ProjectManager.CoupleFile=false in the ok version, true in not ok
MX_ADC4_Init() is the same
MX_GPIO_Init() is the same
MX_ICACHE_Init() is the same
HAL_ADC_MspInit() is the same
HAL_ADC_MspDeInit() is the same
HAL_MspInit() DIFFERS!
Line "HAL_PWREx_EnableVddA();" is not generated!
To me this is a bug. You can add HAL_PWREx_EnableVddA() in the user code section and that should fix it. Please let me know if that works.
ST needs to be aware of this. Please add bug-report tag to your start post.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 2:28 AM
Hello @unsigned_char_array
Concerning the missing HAL_PWREx_EnableVddA() , I confirm that this is a bug that has been raised to our dev team and this will be fixed as soon as possible .
Internal ticket number:143431 (This is an internal tracking number and is not accessible or usable by customers).
I will keep you posted with updates.
THX
Ghofrane
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
‎2024-07-09 5:26 AM
Hi,
Adding HAL_PWREx_EnableVddA() works!
Thank you for investigating.
