lm_micro@shaw.ca
Joined: 25 Sep 2018 Posts: 9 Location: Canada
|
ecan interrupts |
Posted: Fri Jul 05, 2019 4:19 pm |
|
|
I can't find a dsPIC33 ECAN Interrupt example anywhere.
I'm using:
Code: |
#include <33FJ128GP708A.h>
#include "can-PIC24.h"
#include "can-PIC24.c"
// Setup Peripherals
can2_init();
can2_set_mode( CAN_OP_NORMAL );
can2_enable_b_transfer( TRB0 );
can2_enable_interrupts( INT_C2RX );
enable_interrupts( INT_CAN2 );
enable_interrupts( INTR_GLOBAL );
|
then,
Code: |
#INT_CAN2
void CAN2RX_isr()
{
can_message_in_buffer0= TRUE;
}
|
Got No Joy! |
|