stm32h743 ADC

General discussion on mikroPascal PRO for ARM.
Post Reply
Author
Message
Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

stm32h743 ADC

#1 Post by Lin1959 » 28 Nov 2021 17:27

ADC does not work at the native library.
The HAL library is working. What to do?
Who does it work for?

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: stm32h743 ADC

#2 Post by darko.ilijevski » 30 Nov 2021 16:46

Hello,

Can you tell us more about the project you are working on: which board do you use? Is it one of our development boards, a dev board from a 3rd party supplier, or is it a custom-designed one? Also which compiler (version and type - is it mikroC PRO for STM32 or Necto Studio)?

Finally, can you create a simple (minimal) code that demonstrates this behavior and attach it here or send it via our helpdesk portal at https://helpdesk.mikroe.com/?
BR,
Darko

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

Re: stm32h743 ADC

#3 Post by Lin1959 » 30 Nov 2021 21:04

DevEBox stm32h743VI, mikroPascal PRO for ARM 6.2.0.
Shows "2477", does not respond to input Pa6.
Please, help!
p.s. HAL works with the library.
Files STM32H743VI.mlk, __Lib_System_H7xx.emcl replaced .
Program Simple;
Var
Ad : word;
txt : array[5] of char ;
// Main
var LCD_RS : sbit at GPIOD_ODR.B8;
var LCD_EN : sbit at GPIOD_ODR.B9;
var LCD_D4 : sbit at GPIOD_ODR.B10;
var LCD_D5 : sbit at GPIOD_ODR.B11;
var LCD_D6 : sbit at GPIOD_ODR.B12;
var LCD_D7 : sbit at GPIOD_ODR.B13;
begin
Delay_ms(500);
Lcd_Init();
Lcd_Cmd(_LCD_CURSOR_OFF);
ADC_Set_Input_Channel(3);
ADC1_Init();
// GPIO_Digital_Output(@GPIOA_BASE, _GPIO_PINMASK_1);
While (true) do
begin
Delay_ms(500);
Ad := ADC1_Get_Sample(3);
WordToStr(Ad, txt);
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1, 1, txt);
//GPIOA_ODR.1 := not GPIOA_ODR.1 ;
end;
end.
Attachments
__MikroE_Patch_v6.2.zip
(19.58 KiB) Downloaded 50 times
36.ADC.Polling.zip
(302.36 KiB) Downloaded 48 times

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

Re: stm32h743 ADC

#4 Post by Lin1959 » 03 Dec 2021 10:12

Where did I go wrong?

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

Re: stm32h743 ADC

#5 Post by Lin1959 » 06 Dec 2021 16:55

Started working in CubeIDE.:)

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: stm32h743 ADC

#6 Post by darko.ilijevski » 06 Dec 2021 18:51

Hello,
I am sorry for the late reply.
CubeIDE is a native environment for the STM32 family, however - you don't have the ability to use Pascal.
Nevertheless, do you still need help with your mikroPASCAL code? If so, I am now free to check what is going on.

Best regards,
Darko
BR,
Darko

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

Re: stm32h743 ADC

#7 Post by Lin1959 » 07 Dec 2021 20:05

Help!

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

Re: stm32h743 ADC

#8 Post by Lin1959 » 10 Dec 2021 18:10

In the cube, the ADC works, but the DMA does not work!
There was an error in the initialization order of the cube, but they fixed the error! :)

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

Re: stm32h743 ADC

#9 Post by Lin1959 » 13 Dec 2021 18:03

I mastered in a week CubeIDE LCD, TFT, PWM, DMA, ADC, UART, TIM, RTOS!
Join, gentlemen!

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: stm32h743 ADC

#10 Post by darko.ilijevski » 13 Dec 2021 18:49

I am glad you were able to solve your problem by yourself.

Best regards,
Darko
BR,
Darko

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

Re: stm32h743 ADC

#11 Post by Lin1959 » 14 Dec 2021 20:55

I am very glad that you consider errors in your library as my problem.:)

Post Reply

Return to “mikroPascal PRO for ARM General”