2024-07-15 07:57 PM - last edited on 2024-07-15 09:54 PM by Peter BENSCH
LDORDY bit does not exist in any registers mentioned in RM0503 rev 2 . I am using ADC1 in STM32U031R6T6 and the code migrated from STM32L010R8T6 is not working .
2024-07-16 12:15 AM - edited 2024-07-16 12:44 AM
Hello @KSB
Thank you for reporting this issue. Can you give more precision about your request. For the LDORDY bit that is mentioned on the Calibration (ADCAL) part of the RM0503, but it is not mentioned in any register, I've escalated this internally for investigation and correction if necessary (under internal ticket number 186646).
Best Regards.
STTwo-32
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.
2024-07-16 04:40 AM - edited 2024-07-16 04:42 AM
Hi STTwo-32,
i am just trying to run adc in discontonous mode to measure some voltate from two resistor divider connected on channel 6 and 7 and also Vref from internal channel 12
below is the code
RCC->APBENR2|=RCC_APBENR2_ADCEN;
ADC1_COMMON->CCR=ADC_CCR_VREFEN;
ADC1->CFGR2|=(1<<ADC_CFGR2_CKMODE_Pos);
ADC1->CFGR1|=ADC_CFGR1_DISCEN;
ADC1->SMPR=0x05;
ADC1->CR=ADC_CR_ADCAL|ADC_CR_ADVREGEN;
while((ADC1->CR)&(ADC_CR_ADCAL)) // wait while adc calibraion is not complete
{};
ADC1->CR=ADC_CR_ADEN;
ADC1->CHSELR=ADC_CHSELR_CHSEL6|ADC_CHSELR_CHSEL7|ADC_CHSELR_CHSEL12;
ADC1->CR=0x05; //ADC enable and start conversion.
uint16_t adc_data=ADC1->DR;
It gives me a fixed value reading of approx 0x98b channel 5 , 0xfff for channel 6 and 0x5df for channel 12 in the DR after conversion.
Could not find any examples of ADC on a U0 . I dont' know where I am making mistake because this same code worked on STM32L010R8T6.
2024-07-16 05:09 AM
This issue is not the same issue reported on the original request. I suggest you close this one and create a new one for the new request to give it more visibility. As a suggestion, you may want to take a look at the examples of the STM32CubeU0. They should be helpful.
Best Regards.
STTwo-32
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.
2024-09-02 08:41 PM
Hi STTwo-32,
LDORDY bit not found. issue remains the same and I will not close the ticket. you asked me more detail that is why I gave you detail.
2024-09-03 07:16 AM
Is there any update on this issue?
What is LDORDY? Is it a bit that exists in other families, but not this one?
Or is it a typo for some other flag (maybe ADC_ISR_CCRDY, though it seems to apply to regular conversions, not the calibration)?
2024-09-03 08:20 AM
@STTwo-32 wrote:Can you give more precision about your request. For the LDORDY bit that is mentioned on the Calibration (ADCAL) part of the RM0503, but it is not mentioned in any register, I've escalated this internally for investigation and correction if necessary (under internal ticket number 186646).
Best Regards.
STTwo-32
Not sure what you were asking for there, but this confirms that LDORDY appears once - and once only - as mentioned by @KSB :
So it is, indeed, referenced but never defined.
The description of the ADC voltage regulators makes no mention of there being any "ready" signal or flag available:
So is this "LDORDY=1" supposed to indicate the completion of this software delay?
2024-09-04 12:15 AM
By looking at various .svd files, it seems that LDORDY only exists in (some) STM32H7, STM32U5, STM32WL, so I guess that in STM32U0 it doesn't exist, and it's just a copy-and-paste mistake.
It would be nice to have some official confirmation, as well as information whether some other flag rather than LDORDY should be checked.