2017-08-16 02:40 AM
how to configure ADC using just LL library please ?
Solved! Go to Solution.
2017-08-16 06:46 AM
If you still don't have it installed then install The latest STM32CubeF7 library in
using Help -> Install New Libraries (BTW, ST, why is it under the Help menu?). Find out your repository folder by opening Help -> Updater Settings in the menu, then navigate into that folder, then into STM32Cube_FW_F7_V1.7.0/Projects/STM32F767ZI-Nucleo/Examples_LL to find many examples (ADC too) using the LL drivers.2017-08-16 03:08 AM
Hello
youssef.elmzaiti
,we have many STM32 devices. In which one you are interested?
Best regards,
Tilen
2017-08-16 03:18 AM
Hi
youssef.elmzaiti
,You didn't precised the STM32 product you are using.
For STM32L4, you find some examples ADC based on LL driver, you can get them as a strt point.
Look underSTM32Cube_FW_L4_V1.8.0\Projects\STM32L476RG-Nucleo\Examples_LL\ADC.
-Amel
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.
2017-08-16 06:11 AM
Hello
Majerle.Tilen
we want to migrate from stm32f4 to stm32f7 , the problem is in stm32f4 we use SPL lib and in the stm32f7 there'snt a SPL lib , for this we use SPL2LL to migrate from stm32f4_SPL to STM32F7_LL ,
To migrate from SPL to LL there's some execption like ADC ,NVIC Configuration , this configuration is not compatible betwen SPL and LL .
Best regards,
Youssef
2017-08-16 06:20 AM
Hi
st.mcu
,we want to migrate from stm32f4 to stm32f7 , the problem is in stm32f4 we use SPL lib and in the stm32f7 there'snt a SPL lib , for this we use SPL2LL to migrate from stm32f4_SPL to STM32F7_LL ,
To migrate from SPL to LL using SPL2LL there's some execption like ADC ,NVIC Configuration , this configuration is not compatible betwen SPL and LL ,
example :
- for NVIC configuration :
In SPL
static NVIC_InitTypeDef NVIC_InitStructure_TIM9;
NVIC_InitStructure_TIM9.NVIC_IRQChannel = TIM1_BRK_TIM9_IRQn; NVIC_InitStructure_TIM9.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure_TIM9.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure_TIM9.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure_TIM9);in LL , i put this equvalent !
NVIC_SetPriority((TIM1_BRK_TIM9_IRQn,NVIC_EncodePriority(NVIC_GetPriorityGrouping(),1,0)); NVIC_EnableIRQ(TIM1_BRK_TIM9_IRQn );but in ADC i don't how i can put the equivalent , for exemple
in SPL we have :
ADC_InitTypeDef Loc_ADC_InitStructure_init_periph_moteur;
/* ADC1 Configuration (ADC1CLK = 15 MHZ) -----------------------------------*/
Loc_ADC_InitStructure_init_periph_moteur.ADC_Resolution = ADC_Resolution_12b ;Loc_ADC_InitStructure_init_periph_moteur.ADC_ScanConvMode = ENABLE;
Loc_ADC_InitStructure_init_periph_moteur.ADC_ContinuousConvMode = DISABLE;
Loc_ADC_InitStructure_init_periph_moteur.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_Rising ;Loc_ADC_InitStructure_init_periph_moteur.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T2_CC2;
Loc_ADC_InitStructure_init_periph_moteur.ADC_DataAlign = ADC_DataAlign_Right;
Loc_ADC_InitStructure_init_periph_moteur.ADC_NbrOfConversion = NBR_DE_REGULAR_CHANNEL_ADC1;
ADC_Init( ADC1, &Loc_ADC_InitStructure_init_periph_moteur );
so in LL what's the equivalent
best regards ,
Youssef
2017-08-16 06:21 AM
example of equivalence
-
for NVIC configuration :In SPL
static NVIC_InitTypeDef NVIC_InitStructure_TIM9;
NVIC_InitStructure_TIM9.NVIC_IRQChannel = TIM1_BRK_TIM9_IRQn;NVIC_InitStructure_TIM9.NVIC_IRQChannelPreemptionPriority = 1;NVIC_InitStructure_TIM9.NVIC_IRQChannelSubPriority = 0;NVIC_InitStructure_TIM9.NVIC_IRQChannelCmd = ENABLE;NVIC_Init(&NVIC_InitStructure_TIM9);in LL , i put this equvalent !
NVIC_SetPriority((TIM1_BRK_TIM9_IRQn,NVIC_EncodePriority(NVIC_GetPriorityGrouping(),1,0));NVIC_EnableIRQ(TIM1_BRK_TIM9_IRQn );but in ADC i don't how i can put the equivalent , for exemple
in SPL we have :
LEGACY_ADC_InitTypeDef Loc_ADC_InitStructure_init_periph_moteur;
/* ADC1 Configuration (ADC1CLK = 15 MHZ) -----------------------------------*/
Loc_ADC_InitStructure_init_periph_moteur.ADC_Resolution = ADC_Resolution_12b ;Loc_ADC_InitStructure_init_periph_moteur.ADC_ScanConvMode = ENABLE;
Loc_ADC_InitStructure_init_periph_moteur.ADC_ContinuousConvMode = DISABLE;
Loc_ADC_InitStructure_init_periph_moteur.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_Rising ;Loc_ADC_InitStructure_init_periph_moteur.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T2_CC2;
Loc_ADC_InitStructure_init_periph_moteur.ADC_DataAlign = ADC_DataAlign_Right;
Loc_ADC_InitStructure_init_periph_moteur.ADC_NbrOfConversion = NBR_DE_REGULAR_CHANNEL_ADC1;
ADC_Init( ADC1, &Loc_ADC_InitStructure_init_periph_moteur );
so in LL what's the equivalent
2017-08-16 06:22 AM
and there's a example of project using just LL library for stm32f7xx ?
2017-08-16 06:46 AM
If you still don't have it installed then install The latest STM32CubeF7 library in
using Help -> Install New Libraries (BTW, ST, why is it under the Help menu?). Find out your repository folder by opening Help -> Updater Settings in the menu, then navigate into that folder, then into STM32Cube_FW_F7_V1.7.0/Projects/STM32F767ZI-Nucleo/Examples_LL to find many examples (ADC too) using the LL drivers.2017-08-16 06:51 AM
thank you