ADC does not work at the native library.
The HAL library is working. What to do?
Who does it work for?
stm32h743 ADC
- darko.ilijevski
- Posts: 581
- Joined: 21 Mar 2017 16:57
Re: stm32h743 ADC
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/?
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
Darko
Re: stm32h743 ADC
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.
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
- darko.ilijevski
- Posts: 581
- Joined: 21 Mar 2017 16:57
Re: stm32h743 ADC
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
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
Darko
Re: stm32h743 ADC
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!
There was an error in the initialization order of the cube, but they fixed the error!
Re: stm32h743 ADC
I mastered in a week CubeIDE LCD, TFT, PWM, DMA, ADC, UART, TIM, RTOS!
Join, gentlemen!
Join, gentlemen!
- darko.ilijevski
- Posts: 581
- Joined: 21 Mar 2017 16:57
Re: stm32h743 ADC
I am glad you were able to solve your problem by yourself.
Best regards,
Darko
Best regards,
Darko
BR,
Darko
Darko
Re: stm32h743 ADC
I am very glad that you consider errors in your library as my problem.