2019-12-15 05:39 PM
GPIO_Init(GPIOE, GPIO_Pin_7, GPIO_Mode_In_PU_No_IT); ?
is there a standard method?
Solved! Go to Solution.
2019-12-17 11:42 AM
Well, it depends on how you configured your external interrupts! It depends if you want to disable it for one bit or multiple bits and so on...
Put simple, to disable the external interrupt for one port pin, you just need to reset it's position in CR2 register.
Below is an example for PortB pin 5:
in asm:
bres PB_CR2, #5
C (depending on your compiler):
GPIOB->CR2 &= (uint8_t)(~(1<<5));
And ofcourse it can be done in various ways, with macros and functions, different definitions etc.
These things are very well explained in the manuals. So, please read and understand the manuals.
To just jump into programming, without knowing what's behind does not get you far...
2019-12-17 11:42 AM
Well, it depends on how you configured your external interrupts! It depends if you want to disable it for one bit or multiple bits and so on...
Put simple, to disable the external interrupt for one port pin, you just need to reset it's position in CR2 register.
Below is an example for PortB pin 5:
in asm:
bres PB_CR2, #5
C (depending on your compiler):
GPIOB->CR2 &= (uint8_t)(~(1<<5));
And ofcourse it can be done in various ways, with macros and functions, different definitions etc.
These things are very well explained in the manuals. So, please read and understand the manuals.
To just jump into programming, without knowing what's behind does not get you far...
2019-12-18 01:20 AM
got it! maybe i run into fault way.