cancel
Showing results for 
Search instead for 
Did you mean: 

LDORDY bit not found

KSB
Associate II

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 .

KSB_0-1721098607452.png

 

7 REPLIES 7
STTwo-32
ST Employee

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.

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.

 

 

 

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.

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.

SZano
Associate III

@STTwo-32 

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)?


@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 :

AndrewNeil_0-1725376280091.png

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:

AndrewNeil_1-1725376584493.png

So is this "LDORDY=1" supposed to indicate the completion of this software delay?

 

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.