ADC EXTI line 11

General discussion on mikroC PRO for ARM.
Post Reply
Author
Message
granel
Posts: 142
Joined: 13 Feb 2007 11:01

ADC EXTI line 11

#1 Post by granel » 06 May 2020 14:02

stm32f100rb
cannot run one-time conversions from EXTI line 11

using lesson examples (lidstock):
Shawon M. Shahryiar
STM32 ADC External Interrupt Triggered Single Channel Single Conversion Mode Example (EX7)

void EXTI11_ISR() iv IVT_INT_EXTI15_10 ics ICS_AUTO {.....}
dont work with : GPIO_init() {setup_GPIOC(13, (GPIO_PP_output | output_mode_low_speed)); }, but work with:
GPIO_Config(&GPIOC_BASE, _GPIO_PINMASK_13,
_GPIO_CFG_MODE_OUTPUT | _GPIO_CFG_SPEED_MAX | _GPIO_CFG_OTYPE_PP);

BUT MAIN problem:
ADC dont start one-time interrupt conversion EXTI line 11 (((( 2 days try , but (((((((
void ADC1_ISR() iv IVT_INT_ADC1 ics ICS_AUTO {...}

NEED help !!!

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

Re: ADC EXTI line 11

#2 Post by jovana.medakovic » 07 May 2020 11:55

Hello,

Can you share a link from the Libstock or zip and send me the project for review?

Kind regards,
Jovana

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#3 Post by granel » 07 May 2020 12:31

1447778697_stm32_adc_exampl_mikroc_arm.rar

https://libstock.mikroe.com/projects/vi ... c-examples

EX7_

STM32 ADC External Interrupt Triggered Single Channel Single Conversion Mode Example

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#4 Post by granel » 07 May 2020 12:33

4 days of experiments - there is no result, I can’t create an ADC for trigger events

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#5 Post by granel » 07 May 2020 12:57

example 7
Attachments
1447778697_stm32_adc_exampl_mikroc_arm.rar
(5.14 MiB) Downloaded 81 times

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

Re: ADC EXTI line 11

#6 Post by jovana.medakovic » 07 May 2020 14:12

Hello,

This example is written for STM32F103C8 MCU.
You need to use datasheet and reference manual of your stm32f100rb MCU and adapt this example for stm32f100rb MCU:
https://www.st.com/resource/en/datashee ... f100cb.pdf
https://www.st.com/resource/en/referenc ... ronics.pdf

Kind regards,
Jovana

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#7 Post by granel » 07 May 2020 14:30

I did this in different ways - everything works, except for calling the ADC on trigger 11, it seems to me that I memorized the necessary registers by heart, but the problem remains ((, I can’t call the ADC on other external triggers at all

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#8 Post by granel » 07 May 2020 14:33

maybe there are code examples? there is practically no Internet (((at the same time I thought reconfiguring the project settings will allow working with F100RB

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#9 Post by granel » 07 May 2020 14:38

более того - я пытался создать проект для однократного чтения АЦП по тригеру от различных источников, на основе похожих проектов от других компиляторов для МикоЕ, результат тотже - почти все работает, ФЦП не стартует от тригера ( если вставляю команду чтения АЦП в другие прерывания - все ок, но хочу понять -- где я не прав, почему не стартует ФЦП от тригеров ??

----------
moreover, I tried to create a project for a single reading of the ADC on the trigger from various sources, based on similar projects from other compilers for MikoE, the result is the same - almost everything works, the FTP does not start from the trigger (if I insert the ADC reading command into other interrupts - all ok, but I want to understand - where am I wrong, why the FTP does not start from triggers ??

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#10 Post by granel » 07 May 2020 15:41

1- transferred the project without changes to the test board with F103С8
2-project does not work !!
3-changed the settings of the outputs as above (deleted the setting from the author and made the setting on the MicroE = manual == the project began to work)
4-but the floor still does not read the ADC when interrupted from trigger 11
===============
the project behaves exactly the same on microchips:
STM32F103C8 ( like first in project)
and STM32F100RB
=========================
who can help me?

granel
Posts: 142
Joined: 13 Feb 2007 11:01

Re: ADC EXTI line 11

#11 Post by granel » 09 May 2020 11:47

moved the project to STM32CubeIDE -- there are no interruptions 'EXTI line 11' in the ADC settings of the project - why ???
MikroE C ARM have it.
Where is error - CUBE IDE or MikroE ???
Attachments
Screenshot 2020-05-09 at 13.42.03.png
Screenshot 2020-05-09 at 13.42.03.png (368.73 KiB) Viewed 3009 times

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

Re: ADC EXTI line 11

#12 Post by jovana.medakovic » 11 Jun 2020 16:34

Hello,

From what I understood you cannot use PC13 as an external trigger for ADC, it has to be a Px11 pin.

Kind regards,
Jovana

Post Reply

Return to “mikroC PRO for ARM General”