• AVR Freaks

PIC32 CAN EID TX RX Code Example

Author
harlock80
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/03/01 03:33:04
  • Location: 0
  • Status: offline
2011/03/01 03:50:21 (permalink)
0

PIC32 CAN EID TX RX Code Example

Hi to everyone,
I am experiencing a problem receiving CAN messages with the PIC32 CAN EID TX RX Code Example.
I want to receive any can message on the bus ( so no filtering has to be done for doing this I activated 1 filter and 1 filter mask with all zeroes as from specs...) but something strange happens:
If I dont transmit at least 1 CAN message on the bus the RX interrupt wont trigger...
My platform is a PIC 32 Ethernet starter Kit. Attached to 1 CAN bus there is a device which is producing CAN messages continuosly.
 
It s been a while now and I dont understand why I m having this strange behavior, any ideas?
 
here s a code snippet from my project:
 
 
 
void CAN1Init(void)
{
    CAN_BIT_CONFIG canBitConfig;
  
    /* This function will intialize
     * CAN1 module. */
    /* Step 1: Switch the CAN module
     * ON and switch it to Configuration
     * mode. Wait till the mode switch is
    * complete. */
    CANEnableModule(CAN1,TRUE);
    CANSetOperatingMode(CAN1, CAN_CONFIGURATION);
    while(CANGetOperatingMode(CAN1) != CAN_CONFIGURATION);
    /* Step 2: Configure the Clock.The
     * CAN_BIT_CONFIG data structure is used
     * for this purpose. The propagation segment,
     * phase segment 1 and phase segment 2
     * are configured to have 3TQ. SYSTEM_FREQ
     * and CAN_BUS_SPEED are defined in  */
 
    canBitConfig.phaseSeg2Tq            = CAN_BIT_3TQ;
    canBitConfig.phaseSeg1Tq            = CAN_BIT_3TQ;
    canBitConfig.propagationSegTq       = CAN_BIT_3TQ;
    canBitConfig.phaseSeg2TimeSelect    = TRUE;
    canBitConfig.sample3Time            = TRUE;
    canBitConfig.syncJumpWidth          = CAN_BIT_2TQ;
    CANSetSpeed(CAN1,&canBitConfig,SYSTEM_FREQ,CAN_BUS_SPEED);
    /* Step 3: Assign the buffer area to the
     * CAN module.
     */
    CANAssignMemoryBuffer(CAN1,CAN1MessageFifoArea,(2 * 8 * 16));
    CANEnableFeature(CAN1, CAN_RX_TIMESTAMP, TRUE);
    /* Step 5: Configure filters and mask. Configure
     * filter 0 to accept EID messages with ID 0x8004001.
     * Configure filter mask 0 to compare all the ID
     * bits and to filter by the ID type specified in
     * the filter configuration.Messages accepted by
     * filter 0 should be stored in channel 1. */
/*  CANConfigureFilter      (CAN1, CAN_FILTER0, 0x8004001, CAN_EID);
    CANConfigureFilterMask  (CAN1, CAN_FILTER_MASK0, 0x3FFFFFFF, CAN_EID, CAN_FILTER_MASK_IDE_TYPE);
    CANLinkFilterToChannel  (CAN1, CAN_FILTER0, CAN_FILTER_MASK0, CAN_CHANNEL1);
    CANEnableFilter         (CAN1, CAN_FILTER0, TRUE);*/
                                                //0 qui
    CANConfigureFilter      (CAN1, CAN_FILTER0, 0x0, CAN_SID);
    CANConfigureFilterMask  (CAN1, CAN_FILTER_MASK0, 0x0, CAN_SID, CAN_FILTER_MASK_IDE_TYPE);
    CANLinkFilterToChannel  (CAN1, CAN_FILTER0, CAN_FILTER_MASK0, CAN_CHANNEL1);
    CANEnableFilter         (CAN1, CAN_FILTER0, TRUE);
    /* Step 4: Configure channel 0 for TX and size of
     * 8 message buffers with RTR disabled and low medium
     * priority. Configure channel 1 for RX and size
     * of 8 message buffers and receive the full message.*/
    CANConfigureChannelForTx(CAN1, CAN_CHANNEL0, 8, CAN_TX_RTR_DISABLED, CAN_LOW_MEDIUM_PRIORITY);
    CANConfigureChannelForRx(CAN1, CAN_CHANNEL1, 8, CAN_RX_FULL_RECEIVE);
    /* Step 6: Enable interrupt and events. Enable the receive
     * channel not empty  event (channel event) and the receive
     * channel event (module event).
     * The interrrupt peripheral library is used to enable
     * the CAN interrupt to the CPU. */
    CANEnableChannelEvent(CAN1, CAN_CHANNEL1, (CAN_RX_CHANNEL_NOT_EMPTY|CAN_RX_CHANNEL_FULL), TRUE);
    CANEnableModuleEvent (CAN1, CAN_RX_EVENT, TRUE);
    /* These functions are from interrupt peripheral
     * library. */
    INTSetVectorPriority(INT_CAN_1_VECTOR, INT_PRIORITY_LEVEL_4);
    INTSetVectorSubPriority(INT_CAN_1_VECTOR, INT_SUB_PRIORITY_LEVEL_0);
    INTEnable(INT_CAN1, INT_ENABLED);
    /* Step 7: Switch the CAN mode
     * to normal mode. */
    CANSetOperatingMode(CAN1, CAN_NORMAL_OPERATION);
    while(CANGetOperatingMode(CAN1) != CAN_NORMAL_OPERATION);
    CANSetTimeStampValue(CAN1, 0x0);
}
 
 
void CAN1RxMsgProcess(void)
{
    /* This function will check if a CAN
     * message is available in CAN1 channel 1.
     * If so , the message is read. */
    CAN_MESSAGE_ITEM CANMessage;
    CANRxMessageBuffer * message;
    unsigned char cnt;
    static unsigned int led_cnt = 0;
    if(isCAN1MsgReceived == FALSE)
    {
        /* CAN1 did not receive any message so
         * exit the function. Note that the
         * isCAN1MsgReceived flag is updated
         * by the CAN1 ISR. */
        led_cnt++;
        if(led_cnt == 1000)
            LED1_IO = 0;
        return;
    }
    led_cnt = 0;
    LED1_IO ^= 1;
    /* Message was received. Reset message received flag to catch
     * the next message and read the message. Note that
     * you could also check the CANGetRxMessage function
     * return value for null to check if a message has
     * been received. */
    isCAN1MsgReceived = FALSE;
    message = (CANRxMessageBuffer *)CANGetRxMessage(CAN1,CAN_CHANNEL1);
    CANMessage.TimeStamp = CANGetTimeStampValue(CAN1);
    CANMessage.channel  = 0;
    CANMessage.MsgID    = message->msgSID.SID;
    CANMessage.dlc      = message->msgEID.DLC;
    for(cnt=0;cnt<CANMessage.dlc;cnt++)
        CANMessage.data[cnt] = message->data[cnt];
    if(!PushCANMessage(GetRxQueue(),&CANMessage) < 0)
    {
     /* Errore coda piena!! TODO */
    }
    /* Call the CANUpdateChannel() function to let
     * CAN 1 module know that the message processing
     * is done. Enable the receive channale not empty event
     * so that the CAN module generates an interrupt when
     * the event occurs the next time.*/
    CANUpdateChannel(CAN1, CAN_CHANNEL1);
    CANEnableChannelEvent(CAN1, CAN_CHANNEL1, (CAN_RX_CHANNEL_NOT_EMPTY|CAN_RX_CHANNEL_FULL), TRUE);
}
 
void __attribute__((vector(46), interrupt(ipl4), nomips16)) CAN1InterruptHandler(void)
{
    /* This is the CAN1 Interrupt Handler.
     * Note that there are many source events in the
     * CAN1 module for this interrupt. These
     * events are enabled by the  CANEnableModuleEvent()
     * function. In this example, only the RX_EVENT
     * is enabled. */
    /* Check if the source of the interrupt is
     * RX_EVENT. This is redundant since only this
     * event is enabled in this example but
     * this shows one scheme for handling events. */
    if((CANGetModuleEvent(CAN1) & CAN_RX_EVENT) != 0)
    {
    /* Within this, you can check which channel caused the
     * event by using the CANGetModuleEvent() function
     * which returns a code representing the highest priority
     * pending event. */
    if(CANGetPendingEventCode(CAN1) == CAN_CHANNEL1_EVENT)
        {
            /* This means that channel 1 caused the event.
             * The CAN_RX_CHANNEL_NOT_EMPTY event is persistent. You
             * could either read the channel in the ISR
             * to clear the event condition or as done
             * here, disable the event source, and set
             * an application flag to indicate that a message
             * has been received. The event can be
             * enabled by the application when it has processed
             * one message.
             *
             * Note that leaving the event enabled would
             * cause the CPU to keep executing the ISR since
             * the CAN_RX_CHANNEL_NOT_EMPTY event is persistent (unless
             * the not empty condition is cleared.)
             * */
   
            CANEnableChannelEvent(CAN1, CAN_CHANNEL1, (CAN_RX_CHANNEL_NOT_EMPTY|CAN_RX_CHANNEL_FULL), FALSE);
            isCAN1MsgReceived = TRUE;
        }
    }
    /* The CAN1 Interrupt flag is  cleared at the end of the
    * interrupt routine. This is because the interrupt source
    * that could have caused this interrupt  to occur
    * (CAN_RX_CHANNEL_NOT_EMPTY) is disabled. Attempting to
    * clear the CAN1 interrupt flag when the the CAN_RX_CHANNEL_NOT_EMPTY
    * interrupt is enabled will not have any effect because the
    * base event is still present. */
    INTClearFlag(INT_CAN1);
}
 
void CAN1TxSendLEDMsg()
{
    /* This function will send a message to
     * CAN2 with EID 0x8004002. The data payload
     * size is 1 byte. The value of the LED5Status
     * will be toggled and then sent as
     * the payload. CAN1 Channel 0 is used to
     * send the message.*/
    CANTxMessageBuffer * message;
    /* Get a pointer to the next buffer in the channel
     * check if the returned value is null. */
    message = CANGetTxMessageBuffer(CAN1,CAN_CHANNEL0);
    if(message != NULL)
    {
        /* Form a Extended ID CAN message.
         * Start by clearing the buffer. */
        message->messageWord[0] = 0;
        message->messageWord[1] = 0;
        message->messageWord[2] = 0;
        message->messageWord[3] = 0;
    
        message->msgSID.SID = 0x660; /* Send message to CAN2.    */
        //message->msgEID.EID = 0x4002; /* Send message to CAN2.    */
        message->msgEID.IDE = 0;  /* IDE = 1 means Extended ID message. */
        message->msgEID.RTR = 0;  /* Not an RTR message.               */
        message->msgEID.DLC = 8;            /* Send one byte of data.    */
       
        message->data[0]  = 1;            /* This is the payload.     */
        message->data[1]  = 12;
        message->data[2]  = 0;
        message->data[3]  = 0;
        message->data[4]  = 0;
        message->data[5]  = 0;
        message->data[6]  = 255;
        message->data[7]  = 0;
        /* This function lets the CAN module
         * know that the message processing is done
         * and message is ready to be processed. */
        CANUpdateChannel(CAN1,CAN_CHANNEL0);
        /* Direct the CAN module to flush the
         * TX channel. This will send any pending
         * message in the TX channel. */
        CANFlushTxChannel(CAN1,CAN_CHANNEL0); 
    }
}
 
 
 
void main(void)
{
 CAN1Init();
           
 CAN1TxSendLEDMsg(); I have to call this at least one time to start receiving something...

    while(1)
    {
        // Blink LED0 (right most one) every second.
        if(TickGet() - t >= TICK_SECOND/2ul)
        {
            t = TickGet();
            LED0_IO ^= 1;
        }
 
    CAN1RxMsgProcess();
    }
}
 
#1

4 Replies Related Threads

    jaquense
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2011/07/12 11:00:47
    • Location: 0
    • Status: offline
    Re:PIC32 CAN EID TX RX Code Example 2011/07/12 11:33:40 (permalink)
    0

    I have the same problem.


    Did you solve it?


    Regards


    harlock80

    Hi to everyone,
    I am experiencing a problem receiving CAN messages with the PIC32 CAN EID TX RX Code Example.
    I want to receive any can message on the bus ( so no filtering has to be done for doing this I activated 1 filter and 1 filter mask with all zeroes as from specs...) but something strange happens:
    If I dont transmit at least 1 CAN message on the bus the RX interrupt wont trigger...
    My platform is a PIC 32 Ethernet starter Kit. Attached to 1 CAN bus there is a device which is producing CAN messages continuosly.
     
    It s been a while now and I dont understand why I m having this strange behavior, any ideas?
     
    here s a code snippet from my project:
     
     
     
    void CAN1Init(void)
    {
        CAN_BIT_CONFIG canBitConfig;
      
        /* This function will intialize
         * CAN1 module. */
        /* Step 1: Switch the CAN module
         * ON and switch it to Configuration
         * mode. Wait till the mode switch is
        * complete. */
        CANEnableModule(CAN1,TRUE);
        CANSetOperatingMode(CAN1, CAN_CONFIGURATION);
        while(CANGetOperatingMode(CAN1) != CAN_CONFIGURATION);
        /* Step 2: Configure the Clock.The
         * CAN_BIT_CONFIG data structure is used
         * for this purpose. The propagation segment,
         * phase segment 1 and phase segment 2
         * are configured to have 3TQ. SYSTEM_FREQ
         * and CAN_BUS_SPEED are defined in  */
     
        canBitConfig.phaseSeg2Tq            = CAN_BIT_3TQ;
        canBitConfig.phaseSeg1Tq            = CAN_BIT_3TQ;
        canBitConfig.propagationSegTq       = CAN_BIT_3TQ;
        canBitConfig.phaseSeg2TimeSelect    = TRUE;
        canBitConfig.sample3Time            = TRUE;
        canBitConfig.syncJumpWidth          = CAN_BIT_2TQ;
        CANSetSpeed(CAN1,&canBitConfig,SYSTEM_FREQ,CAN_BUS_SPEED);
        /* Step 3: Assign the buffer area to the
         * CAN module.
         */
        CANAssignMemoryBuffer(CAN1,CAN1MessageFifoArea,(2 * 8 * 16));
        CANEnableFeature(CAN1, CAN_RX_TIMESTAMP, TRUE);
        /* Step 5: Configure filters and mask. Configure
         * filter 0 to accept EID messages with ID 0x8004001.
         * Configure filter mask 0 to compare all the ID
         * bits and to filter by the ID type specified in
         * the filter configuration.Messages accepted by
         * filter 0 should be stored in channel 1. */
    /*  CANConfigureFilter      (CAN1, CAN_FILTER0, 0x8004001, CAN_EID);
        CANConfigureFilterMask  (CAN1, CAN_FILTER_MASK0, 0x3FFFFFFF, CAN_EID, CAN_FILTER_MASK_IDE_TYPE);
        CANLinkFilterToChannel  (CAN1, CAN_FILTER0, CAN_FILTER_MASK0, CAN_CHANNEL1);
        CANEnableFilter         (CAN1, CAN_FILTER0, TRUE);*/
                                                    //0 qui
        CANConfigureFilter      (CAN1, CAN_FILTER0, 0x0, CAN_SID);
        CANConfigureFilterMask  (CAN1, CAN_FILTER_MASK0, 0x0, CAN_SID, CAN_FILTER_MASK_IDE_TYPE);
        CANLinkFilterToChannel  (CAN1, CAN_FILTER0, CAN_FILTER_MASK0, CAN_CHANNEL1);
        CANEnableFilter         (CAN1, CAN_FILTER0, TRUE);
        /* Step 4: Configure channel 0 for TX and size of
         * 8 message buffers with RTR disabled and low medium
         * priority. Configure channel 1 for RX and size
         * of 8 message buffers and receive the full message.*/
        CANConfigureChannelForTx(CAN1, CAN_CHANNEL0, 8, CAN_TX_RTR_DISABLED, CAN_LOW_MEDIUM_PRIORITY);
        CANConfigureChannelForRx(CAN1, CAN_CHANNEL1, 8, CAN_RX_FULL_RECEIVE);
        /* Step 6: Enable interrupt and events. Enable the receive
         * channel not empty  event (channel event) and the receive
         * channel event (module event).
         * The interrrupt peripheral library is used to enable
         * the CAN interrupt to the CPU. */
        CANEnableChannelEvent(CAN1, CAN_CHANNEL1, (CAN_RX_CHANNEL_NOT_EMPTY|CAN_RX_CHANNEL_FULL), TRUE);
        CANEnableModuleEvent (CAN1, CAN_RX_EVENT, TRUE);
        /* These functions are from interrupt peripheral
         * library. */
        INTSetVectorPriority(INT_CAN_1_VECTOR, INT_PRIORITY_LEVEL_4);
        INTSetVectorSubPriority(INT_CAN_1_VECTOR, INT_SUB_PRIORITY_LEVEL_0);
        INTEnable(INT_CAN1, INT_ENABLED);
        /* Step 7: Switch the CAN mode
         * to normal mode. */
        CANSetOperatingMode(CAN1, CAN_NORMAL_OPERATION);
        while(CANGetOperatingMode(CAN1) != CAN_NORMAL_OPERATION);
        CANSetTimeStampValue(CAN1, 0x0);
    }
     
     
    void CAN1RxMsgProcess(void)
    {
        /* This function will check if a CAN
         * message is available in CAN1 channel 1.
         * If so , the message is read. */
        CAN_MESSAGE_ITEM CANMessage;
        CANRxMessageBuffer * message;
        unsigned char cnt;
        static unsigned int led_cnt = 0;
        if(isCAN1MsgReceived == FALSE)
        {
            /* CAN1 did not receive any message so
             * exit the function. Note that the
             * isCAN1MsgReceived flag is updated
             * by the CAN1 ISR. */
            led_cnt++;
            if(led_cnt == 1000)
                LED1_IO = 0;
            return;
        }
        led_cnt = 0;
        LED1_IO ^= 1;
        /* Message was received. Reset message received flag to catch
         * the next message and read the message. Note that
         * you could also check the CANGetRxMessage function
         * return value for null to check if a message has
         * been received. */
        isCAN1MsgReceived = FALSE;
        message = (CANRxMessageBuffer *)CANGetRxMessage(CAN1,CAN_CHANNEL1);
        CANMessage.TimeStamp = CANGetTimeStampValue(CAN1);
        CANMessage.channel  = 0;
        CANMessage.MsgID    = message->msgSID.SID;
        CANMessage.dlc      = message->msgEID.DLC;
        for(cnt=0;cnt<CANMessage.dlc;cnt++)
            CANMessage.data[cnt] = message->data[cnt];
        if(!PushCANMessage(GetRxQueue(),&CANMessage) < 0)
        {
         /* Errore coda piena!! TODO */
        }
        /* Call the CANUpdateChannel() function to let
         * CAN 1 module know that the message processing
         * is done. Enable the receive channale not empty event
         * so that the CAN module generates an interrupt when
         * the event occurs the next time.*/
        CANUpdateChannel(CAN1, CAN_CHANNEL1);
        CANEnableChannelEvent(CAN1, CAN_CHANNEL1, (CAN_RX_CHANNEL_NOT_EMPTY|CAN_RX_CHANNEL_FULL), TRUE);
    }
     
    void __attribute__((vector(46), interrupt(ipl4), nomips16)) CAN1InterruptHandler(void)
    {
        /* This is the CAN1 Interrupt Handler.
         * Note that there are many source events in the
         * CAN1 module for this interrupt. These
         * events are enabled by the  CANEnableModuleEvent()
         * function. In this example, only the RX_EVENT
         * is enabled. */
        /* Check if the source of the interrupt is
         * RX_EVENT. This is redundant since only this
         * event is enabled in this example but
         * this shows one scheme for handling events. */
        if((CANGetModuleEvent(CAN1) & CAN_RX_EVENT) != 0)
        {
        /* Within this, you can check which channel caused the
         * event by using the CANGetModuleEvent() function
         * which returns a code representing the highest priority
         * pending event. */
        if(CANGetPendingEventCode(CAN1) == CAN_CHANNEL1_EVENT)
            {
                /* This means that channel 1 caused the event.
                 * The CAN_RX_CHANNEL_NOT_EMPTY event is persistent. You
                 * could either read the channel in the ISR
                 * to clear the event condition or as done
                 * here, disable the event source, and set
                 * an application flag to indicate that a message
                 * has been received. The event can be
                 * enabled by the application when it has processed
                 * one message.
                 *
                 * Note that leaving the event enabled would
                 * cause the CPU to keep executing the ISR since
                 * the CAN_RX_CHANNEL_NOT_EMPTY event is persistent (unless
                 * the not empty condition is cleared.)
                 * */
       
                CANEnableChannelEvent(CAN1, CAN_CHANNEL1, (CAN_RX_CHANNEL_NOT_EMPTY|CAN_RX_CHANNEL_FULL), FALSE);
                isCAN1MsgReceived = TRUE;
            }
        }
        /* The CAN1 Interrupt flag is  cleared at the end of the
        * interrupt routine. This is because the interrupt source
        * that could have caused this interrupt  to occur
        * (CAN_RX_CHANNEL_NOT_EMPTY) is disabled. Attempting to
        * clear the CAN1 interrupt flag when the the CAN_RX_CHANNEL_NOT_EMPTY
        * interrupt is enabled will not have any effect because the
        * base event is still present. */
        INTClearFlag(INT_CAN1);
    }
     
    void CAN1TxSendLEDMsg()
    {
        /* This function will send a message to
         * CAN2 with EID 0x8004002. The data payload
         * size is 1 byte. The value of the LED5Status
         * will be toggled and then sent as
         * the payload. CAN1 Channel 0 is used to
         * send the message.*/
        CANTxMessageBuffer * message;
        /* Get a pointer to the next buffer in the channel
         * check if the returned value is null. */
        message = CANGetTxMessageBuffer(CAN1,CAN_CHANNEL0);
        if(message != NULL)
        {
            /* Form a Extended ID CAN message.
             * Start by clearing the buffer. */
            message->messageWord[0] = 0;
            message->messageWord[1] = 0;
            message->messageWord[2] = 0;
            message->messageWord[3] = 0;
        
            message->msgSID.SID = 0x660; /* Send message to CAN2.    */
            //message->msgEID.EID = 0x4002; /* Send message to CAN2.    */
            message->msgEID.IDE = 0;  /* IDE = 1 means Extended ID message. */
            message->msgEID.RTR = 0;  /* Not an RTR message.               */
            message->msgEID.DLC = 8;            /* Send one byte of data.    */
           
            message->data[0]  = 1;            /* This is the payload.     */
            message->data[1]  = 12;
            message->data[2]  = 0;
            message->data[3]  = 0;
            message->data[4]  = 0;
            message->data[5]  = 0;
            message->data[6]  = 255;
            message->data[7]  = 0;
            /* This function lets the CAN module
             * know that the message processing is done
             * and message is ready to be processed. */
            CANUpdateChannel(CAN1,CAN_CHANNEL0);
            /* Direct the CAN module to flush the
             * TX channel. This will send any pending
             * message in the TX channel. */
            CANFlushTxChannel(CAN1,CAN_CHANNEL0); 
        }
    }
     
     
     
    void main(void)
    {
     CAN1Init();
               
     CAN1TxSendLEDMsg(); I have to call this at least one time to start receiving something...

        while(1)
        {
            // Blink LED0 (right most one) every second.
            if(TickGet() - t >= TICK_SECOND/2ul)
            {
                t = TickGet();
                LED0_IO ^= 1;
            }
     
        CAN1RxMsgProcess();
        }
    }
     


    #2
    harlock80
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2011/03/01 03:33:04
    • Location: 0
    • Status: offline
    Re:PIC32 CAN EID TX RX Code Example 2011/07/12 23:59:22 (permalink)
    0
    Hi,
    nope I did not solve it. Still the same...
    any ideas anyone?
    #3
    biclas
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2012/01/03 09:22:42
    • Location: 0
    • Status: offline
    Re:PIC32 CAN EID TX RX Code Example 2012/01/03 11:41:39 (permalink)
    0

    Hi,

    I am experiencing a similar problem when receiving and transmiting CAN messages with the same base code.

    All modes, except CAN_NORMAL_OPERATION, works like they should... I already test that.

    I don't receive any message even when i transmit something first...this let me to think that i'm not transmiting any message when in CAN_NORMAL_OPERATION...and that's true...i already check too...

    Anyone with the same problem?
    Any help is welcome
    Thank you in advance
    #4
    tchoutchawn
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2013/04/20 20:17:27
    • Location: 0
    • Status: offline
    Re:PIC32 CAN EID TX RX Code Example 2013/04/24 14:50:56 (permalink)
    0
    Im sorry if I bump an old thread, but you should add:
    INTEnableInterrupts();
    just after CAN1Init().
     
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5