Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

NRF9E5 External Interrupt Issue

Status
Not open for further replies.

Sobakava

Full Member level 6
Joined
Mar 27, 2002
Messages
350
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
3,342
I'm trying to detect external interrupts using NRF9E5 / 8051 core RF transceiver microcontroller. Development environment is Keil C51

At first I was confused with ISR declarations:

void INT0_ISR( void ) interrupt 0 //0x03{

// Ext INT0 handler

}


void INT1_ISR( void ) interrupt 2 //0x13{

// Ext INT1 handler

}


Is that correct?If so, I still can't figure out why I can't detect external interruptsI enabled the interrupt using EX1 bit.


void INT0_ISR( void ) interrupt 0 //0x03{

// Ext INT0 handler

LED ^= 1; // toggle LED

}void INT1_ISR( void ) interrupt 2 //0x13

{

// Ext INT1 handler

LED ^=1; // toggle LED

}

void main ( void ) {

PO_DIR = 0x57; // P07 output P05 LED. Rest is input

EX0 = 1;

EX1 = 1;

EA = 1;

while( 1 ) {

P07=1; delayms(1);

P07=0; delayms(1);

}

}

Using this piece of code, I could never detect the interrupts applied by an external source or micro-switch with pull up resistors connected to P03 and P04.

These pins are configured as inputs. Interrupts are enabled including global interrupt.
I also enabled a timer0 overflow interrupt to test if any interrupt works. It works.

I tried to toggle LED in main loop. It is also OK.

Somehow I can not generate interrupts using INT1 and INT0 pins. I also tried both configurations; level sensitive mode and edge sensitive mode. It does not help too.

Any ideas? Any tested code for this MCU or any other 8051 core microcontorller with INT0_N and INT1_N interrupt inputs?

Regards
 

Here is the solution from myself as a future reference to who faces with the same issue:

Nordic replied my support case. The problem was, NRF9E5 INT_0 and INT_1 external interrupts should be configured using P0_ALT register. If P0.3 and P0.4 pins are configured as I/O, they don't generate interrupts. They should be configured as interrupt pins using P0_ALT register.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top