55. How to Make Multiple Pin External Interrupts (2 pins) - ARM STM32 Microcontroller Tutorial

preview_player
Показать описание
Purchase my new book: Arm Microcontroller Programming and Circuit Building Volume 1

I recommend using the STM32CubeIDE:

You can still download the CoIDE here:

Please watch: "Buildyourcnc CNC Router on Love Yurts"
Patrick's Tip Jar:
bitcoin:1Gtawd29Sgu5CdvfUnkRg1YBfowCawjFdH
Ether:0xa962365100011B79097A7bb9DD51A53eE98266bb
If you have found this video to be helpful, consider making a tip. Thanks.

Prerequisites:

Connecting an LCD to the ARM STM32 Microcontroller

ADC for the ARM STM32 Microcontroller:

In this video, I show the circuit and how to create multiple external interrupts.

Recommended servos:

Equipment that I use to make videos:

Рекомендации по теме
Комментарии
Автор

BRO IF YOU HAD A PATREON PAGE I WOULD 100% SUPPORT YOU

mohamedtebbo
Автор

Hi,
I've been enjoying these videos. Thanks for all your efforts.

I do have a resolution for the problem regarding not being able to run GPIO ports other than just GPIOA on the various EXTI0 - EXTI15 lines. The solution is: the system clock that is used by SYSCFG needs to be enabled.

The below line of code needs to be added near the start of the program when the GPIO ports, (GPIOA, GPIOB....) are enabled in "RCC->AHBENR". (This additional code only needs to be executed once.)

RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;

It seems that without the above clock enable statement for SYSCFG, the C Compiler, in the generated underlying-Assembler source, will ignore (by optimizing out) any writes to "SYSCFG->EXTICR[#]". This leaves the registers used for External Interrupt Configuration at their default value of all zeros indicating that GPIOA should be used for all the lines: EXTI0 - EXTI15.

jdclaypoole
Автор

Hey,
Thanks a lot for sharing ...
I would really like to know from where you learnt ARM, can you recommend some books from where we can learn or which can be used as reference ?


And if there are no such books, have you ever planned to write your own book ?

ParthBhat
Автор

I think the SYSCFG->EXTICR[3] = ... should be |=...

Daniel-xaogjeyh
Автор

Is the same principle applies to arduino??

Sekhar_Home
Автор

Hey when you are adding another button PA11 aren't you also needed to change the value of the
SYSCFG->EXTICR[2] |= SYSCFG_EXTICR3_EXTI11. I works without it too. it works with it too. But i feel like including it is a better thing. what do you say?

shivakumar-lvwr
Автор

Only PortA Worked For Me .. NO C OR B .. I Was Trying For a Week also

ahmedelsmahypersonal
Автор

You really should write ONLY the single bit into the reset register:
EXTI->PR = ... NOT "|=". |= will reset ALL set bits and might mean that you skip several interrupts that occur at nearly the same time as the first pin serviced. In fact, EXTI->PR |= 0; will do the same thing you are doing.

byronwatkins
Автор

???;{Thanks a lot for sharing ; {can we do port D&&portE interruption
//{pic16f877A}//

kennany
Автор

You really should write ONLY the single bit into the reset register:
EXTI->PR = ... NOT "|=". |= will reset ALL set bits and might mean that you skip several interrupts that occur at nearly the same time as the first pin serviced. In fact, EXTI->PR |= 0; will do the same thing you are doing.

byronwatkins
welcome to shbcf.ru