2026-03-15 8:19 PM - edited 2026-03-16 11:46 PM
I am planning to do an aging test which need capture the voltage of a net, but i found STM32U585OIY6QTR report a value about 40 while the actual voltage of ADC channel is close to VREF.
Then i write a simple ADC demo to verify ADC configuration, and run my code on B-U585I-IOT02A board(based on STM32U585AII6Q), it report a correct value, but the same code report a wrong value on my board.I use ADC1 CHANNEL2(GPIOC GPIO_PIN_1) on both board.
The only difference between B-U585I-IOT02A and my hardware is the different VREF i think(B-U585I-IOT02A use 3.3V, but my board use 2.5V).
Is there any difference on ADC usage between STM32U585AII6Q and STM32U585OIY6QTR?
You can find my ioc file and code in attachment, can anyone help me check my configuration?
Solved! Go to Solution.
2026-03-30 4:06 AM
Thanks you for the reminder.
Finally, i found the root cause. I use the "erase full chip memory" function of Cube programmer to restore all option byte, and didn't check the actual value of TZEN, so TZEN is opened when i did the test. The correct method to close the TrustZone is set RDP first and close TZEN.
2026-03-16 2:42 AM
Frankly speaking, your descriptions and your results can't match.
As your code did not work on your board, you may do simple test on your board - to measure 0V and Vref first to see if OK or not - to ensure your board (hardware) is OK first.
2026-03-16 6:24 AM
Is your board designed correctly? Is there a cap on VDDA/VREF+ and is the voltage buffer enabled? Show schematic if you can.
2026-03-16 6:56 PM
Thanks for your reply!
Sure, I fogot to add these message. This ADC channel return a value about 40 when connected to 0V and VDDA, it doesn't change according to channel voltage.
Actually, i have a project with trustzone enabled shows that hardware have no issue, but i don't have the source code.
2026-03-16 6:59 PM
Thanks for your reply!
Actually, i have a project with trustzone enabled shows that hardware have no issue, but i don't have the source code.
So, this issue more likely to caused by configuration.
2026-03-16 7:11 PM
According to your explanation, you use same code on B-U585I-IOT02A board (based on STM32U585AII6Q) and your board (STM32U585OIY6QTR), you need to ensure that the ADC channel and GPIO pin (you did not share such information) are the same between 2 boards. So, you may check and ensure same the ADC channel and GPIO pin.
2026-03-16 10:06 PM
2026-03-16 10:12 PM
It is possible that same ADC channel may be mapped to different GPIO pin.
So, it is important to ensure that both ADC channel and GPIO pin (GPIO pin information is unkown) are the same between 2 boards.
2026-03-16 11:24 PM
Yes, both board use ADC_CHANNEL_2 and GPIOC GPIO_PIN_1.
2026-03-16 11:51 PM
OK. PC1 can be ADC1_IN2 and/or ADC4_IN2 for both STM32U585AII6Q and STM32U585OIY6Q.
2 tests can be done.
1) if possible, try to toggle PC1 to see if you can see expected signal on you board with STM32U585OIY6Q.
2) test other ADC channel(s) - internal/external to see if the ADC (ADC1 or ADC4) is OK on you board.