News:

;) This forum is the property of Proton software developers

Main Menu

dsPIC33CK256MP508 INT1 doesn't fire

Started by Wimax, Aug 02, 2025, 04:36 PM

Previous topic - Next topic

Wimax

Hello everybody !

I have a problem with the INT1 interrupt on a dsPIC33CK256MP508 as I can't get it working properly.
I defined the selected input pin for this function using the PPS macro:
PPS_Input(cIn_Pin_RP75, cIn_Fn_INT1) ' Map INT1 RX pin to RD11I defined the pin used as an input with the "PinInput" instruction.
I initialised the interrupt:

    IFS0bits_INT1IF=0
    IPC3bits_INT1IP0 =1
    IPC3bits_INT1IP1 =1
    IPC3bits_INT1IP2 =1
    INTCON2bits_INT1EP=1 '1 = External Interrupt on negative edge
    IEC0bits_INT1IE= 1 '1 = External Interrupt on edge is active 
    INTCON2bits_GIE=1

and then the interrupt handling routine, that is never invoked.

Isr INT1Interrupt
HRSOutLn "Test" ' Simple test line 
IFS0bits_INT1IF=0
EndIsr


I added these interrupt priority lines within the .def file:
' Definisco IPC3 priority bits for external interrupt 1

$define IPC3bits_INT1IP0 IPC3.12
$define IPC3bits_INT1IP1 IPC3.13
$define IPC3bits_INT1IP2 IPC3.14
I checked both with the oscilloscope and in the main programme, using a simple control loop, that the pin status changes, but the interrupt is not triggered at all.

I add that trying with INT2 instead of INT1, the program works, but I don't understand why !