cancel
Showing results for 
Search instead for 
Did you mean: 

Cortex -- PD0 interrupt

cgrenier
Associate II
Posted on October 01, 2008 at 15:19

Cortex -- PD0 interrupt

5 REPLIES 5
cgrenier
Associate II
Posted on May 17, 2011 at 12:26

Hello,

I have a problem to configure PD0 as an input, interrupt enable.

I got no external interrupts. Only software interrupt works.

The GPIOD -- IDR (input data register) register shows the current state of this line. When I press to switch (PD0), The IDR register shows the 0 at PD0, otherwise it shows 1. So, it should generate an interrupt. I have other switches on other inputs and it works pretty well. Is there any examples to use PD0 and external interrupt?

GPIO_PinRemapConfig(GPIO_Remap_PD01, ENABLE);

EXTI_InitStructure.EXTI_Line = EXTI_Line0;

EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;

EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising_Falling;

EXTI_InitStructure.EXTI_LineCmd = ENABLE;

EXTI_Init(&EXTI_InitStructure);

// Set the Preemption Priority to ''1''

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;

// Set the Command to ''Enable''

NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

// Configure and enable EXTI0 IRQ Channel

NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQChannel;

NVIC_Init(&NVIC_InitStructure);

markusmueller19
Associate II
Posted on May 17, 2011 at 12:26

Thank you very much, I have a 48 pin package... :(

markusmueller19
Associate II
Posted on May 17, 2011 at 12:26

Gives there a solution for this problem?

I have the same problem.

tibo
Associate II
Posted on May 17, 2011 at 12:26

RM0008, page 107: ''PD0, PD1 cannot be used for external interrupt/event

generation on 36, 48, 64-pin packages.''

jj
Associate II
Posted on May 17, 2011 at 12:26

tibo-

Thank you from my firm too - we had started laying out a 64 pin device - even after having read/noted RM0008.

Looks like its time to extract every ''gotcha'' to a special file where we're less likely to ''miss them'' in the mix...