2023-03-13 03:41 AM
For Channel=5 and Rank=1 the result is ADC_SQR1=0xA (incorrect).
Should be 0x140.
Solved! Go to Solution.
2023-03-14 02:10 AM
Dear Kaouthar,
Thank you for your support.
The issue was on my side.
Of course, I modified the structure element (in main.c) by hand and did not realize that the Rank=1 corresponds to:
sConfig.Rank = ADC_REGULAR_RANK_1;
but not:
sConfig.Rank = 1;
Best regards,
Fedor
2023-03-13 06:46 AM
Hello @FBaev.1 and welcome to the community :smiling_face_with_smiling_eyes:,
Could you please provide more details on the issue:
Make sure to use latest release of tools and last STM32Cube FW_H7 V1.11.0 firmware package.
Thank you.
Kaouthar
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.
2023-03-13 10:31 AM
Hello Kaouthar,
Thank you for the reply.
I'm using the STM32CubeIDE Version: 1.12.0 and STM32Cube_FW_H7_V1.11.0.
The board is a proprietary one based on the STM32H743ZGT6.
The issue can be observed on any evaluation board.
Possible software example is "LwIP_HTTP_Server_Raw" for STM32H743I-EVAL board.
Best regards,
Fedor
2023-03-14 12:26 AM
Hello @FBaev.1 ,
Thank you for this clarification.
I made some tests with Nucleo-H723ZG and I didn't find any issue and I get ADC_SQR1=0x140.
I will check again with Eval board and I will get back to you as soon as possible.
Thank you.
Kaouthar
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.
2023-03-14 12:42 AM
Hello Kaouthar,
You wrote:
> I made some tests with Nucleo-H723ZG
How exactly you obtained the ADC_SQR1=0x140?
What is the MODIFY_REG formulae in the LL_ADC_REG_SetSequencerRanks() in your test project?
Thank you,
Fedor
2023-03-14 01:15 AM
Hi @FBaev.1 ,
> How exactly you obtained the ADC_SQR1=0x140?
The MODIFY_REG formula in the LL_ADC_REG_SetSequencerRanks() is
MODIFY_REG(*preg, ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 << (Rank & ADC_REG_RANK_ID_SQRX_MASK), ((Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank ADC_REG_RANK_ID_SQRX_MASK));
Also with the STM32H757I-Eval board, with Channel=5 and Rank=1, the ADC_SQR1=0x140.
I hope this help you to solve the issue :) !
Kaouthar
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.
2023-03-14 01:45 AM
I performed the same steps - i.e.
and see that ADC_SQR1=0xA .
Still not clear how:
((Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_REG_RANK_ID_SQRX_MASK)
can be evaluated for 0x140 for Channel=5 and Rank=1.
2023-03-14 02:10 AM
Dear Kaouthar,
Thank you for your support.
The issue was on my side.
Of course, I modified the structure element (in main.c) by hand and did not realize that the Rank=1 corresponds to:
sConfig.Rank = ADC_REGULAR_RANK_1;
but not:
sConfig.Rank = 1;
Best regards,
Fedor
2023-03-14 02:16 AM
Hello @FBaev.1 ,
Glad to know that the issue is already fixed.
Thank you for your contribution in STCommunity :) .
Kaouthar
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.