STM32H743VI and ADC Problem

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
RM65
Posts: 8
Joined: 03 May 2020 13:43

STM32H743VI and ADC Problem

#1 Post by RM65 » 08 Jun 2020 16:46

Hello,
i try to read two ADC's but the program seems to "hang"....

My code:
...
dim ch1 as integer
dim ch2 as integer
main:
ADC_Set_Input_Channel(_ADC_CHANNEL_5 or _ADC_CHANNEL_9) 'PORTB.0 and PORTB.1
ADC1_Init
while TRUE

ch1 = ADC1_Read(5)
ch2 = ADC1_Read(9)

display_menu(10, ch1) 'send to my display
display_menu(10, ch2) 'send to my display

wend
end.

Regards,
Ralf

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: STM32H743VI and ADC Problem

#2 Post by jovana.medakovic » 09 Jun 2020 16:20

Hi Ralf,

I believe that I answered you on the ticket, so we can continue the conversation there.

Kind regards,
Jovana

Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

Re: STM32H743VI and ADC Problem

#3 Post by Lin1959 » 18 Nov 2021 20:38

I have this problem. How to solve?

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: STM32H743VI and ADC Problem

#4 Post by filip » 19 Nov 2021 09:41

Hi,

If you are using ADC2 to read channel 9 does this work :

Code: Select all

ADC1_Init()  
ADC2_Init()
ADC1_Get_Sample(5)
ADC2_Get_Sample(9)
Regards,
Filip.

Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

Re: STM32H743VI and ADC Problem

#5 Post by Lin1959 » 19 Nov 2021 19:55

Hi!
mikroBasic PRO for ARM, stm32h743, project edit - default. ADC will work?

Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

Re: STM32H743VI and ADC Problem

#6 Post by Lin1959 » 21 Nov 2021 09:59

Hey! Where can I find the new __Lib_System_H7xx.emcl file for STM32H7 in mikroBasiс?

Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

Re: STM32H743VI and ADC Problem

#7 Post by Lin1959 » 21 Nov 2021 13:11

Found and replaced the file, PLL works, but ADC does not work! :(

Post Reply

Return to “mikroBasic PRO for ARM General”