Error after CAN0TIER is set

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error after CAN0TIER is set

1,416 Views
christinar
Contributor II

Hello together,

I'm using the DEVKIT S12ZVC and want to use the MSCAN. By debugging my code I get the error message "No source available for "0x000001 (0x000001)()". The failure occours only when CAN0TIER is et to 0x01.

Does anyone know what the problem could be here?

Thank you in advance.

0 Kudos
Reply
6 Replies

1,201 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

It sound like to MCU reset and the debugger is disconnected.

Can you please share a test code? So that I can test it on my side. 

Thanks,

Daniel

0 Kudos
Reply

1,201 Views
christinar
Contributor II

I can't share the complete code but after this function I have the error "No source available for "0x000001 (0x000001)()".

 

typedef struct {

  UBYTE IDR0;         // Identifier Register 0

  UBYTE IDR1;         // Identifier Register 1

  UBYTE Data0;        // Data Segment Register 0

  UBYTE Data1;        // Data Segment Register 1

  UBYTE Data2;        // Data Segment Register 2

  UBYTE Data3;        // Data Segment Register 3

  UBYTE Data4;        // Data Segment Register 4

  UBYTE Data5;        // Data Segment Register 5

  UBYTE Data6;        // Data Segment Register 6

  UBYTE Data7;        // Data Segment Register 7

  UBYTE DLC;          // Data Length Register

  UBYTE Req;          // Request for transmit

} CAN_TX;

 

 

CAN_TX   TX_QUEUE[3];

 

 

//Planned is that this function queues a message in the transmit buffer and then enables transmit interrupts so that it gets sent.

 

Void TxMessage(UBYTE *data, UBYTE length) {

  

  UWORD id;

 

    id = 0x862;

   

    TX_QUEUE[Msg].IDR0 = (id >> 3) & 0xFF; //upper 8 bits of 11-bit Identifier;

    TX_QUEUE[Msg].IDR1 = (id << 5) & 0xFF; //lower 3 bits of 11-bit Identifier

 

    TX_QUEUE[Msg].Data0 = data[0];

    TX_QUEUE[Msg].Data1 = data[1];

    TX_QUEUE[Msg].Data2 = data[2];

    TX_QUEUE[Msg].Data3 = data[3];

    TX_QUEUE[Msg].Data4 = data[4];

    TX_QUEUE[Msg].Data5 = data[5];

    TX_QUEUE[Msg].Data6 = data[6];

    TX_QUEUE[Msg].Data7 = data[7];

              

    TX_QUEUE[Msg].DLC = length;       

    TX_QUEUE[Msg].ReqXMT = 0x01;     

 

    Msg++;

    if (Msg >= 3) {

      Msg = 0;

    }

   CAN0TIER = 0x01

  }

}

 

0 Kudos
Reply

1,201 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Did you implemented CAN0TX ISR?

It should trigger the interrupt.

Thanks,

Daniel

0 Kudos
Reply

1,201 Views
christinar
Contributor II

Hi,

Yes that's my code.

regards,

Christina

__interrupt void isrVcantx(void){

         /* Write your interrupt code here ... */

         CAN_TX_Scanner();  

// Load message response into selected XMT buffer, called by CAN transmit interrupt  -> Extracts the next message from the MCB queue and transmits it.

}

 

/* ISR prototype */

typedef void (*const tIsrFunc)(void);

/* Pack 3 byte pointers as 4 byte Interrupt Vector Table entries */

typedef struct

{

  //byte padding;

  tIsrFunc address;

} InterruptTableEntry;

 

#ifndef UNASSIGNED_ISR

#define UNASSIGNED_ISR 0xFFFF /* unassigned interrupt service routine */

#endif

 

const InterruptTableEntry _InterruptVectorTable[123] @0x00FFFE10U = { /* Interrupt vector table */

/*lint -restore Enable MISRA rule (1.1) checking. */

  /*ISR name            No.   Address      Priority  Name                 Description */

  _VECTOR,           /* 0x04  0x00FFFE10   1         ivVReserved123  Unassigned */

  _VECTOR,           /* 0x05  0x00FFFE14   1         ivVReserved122  Unassigned */

.

.

.

isrVcantx,              /* 0x54  0x00FFFF50   1           ivVcan0tx                                   

isrVcanrx,              /* 0x55  0x00FFFF54   1           ivVcan0rx

.

.

.

 _VECTOR,           /* 0x7E  0x00FFFFF8   -            ivVspare               Unassigned */

 _Startup               /*  -        0x00FFFFFC   -            ivVreset                Reset handler*/

 };

0 Kudos
Reply

1,201 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I think there must be some problem with the interrupt handler.

Does it trigger machine exception? If so, please check MMC registers from the exception handler.

Have you referred to MSCAN on the MagniV (AN4975)?

AN4975_SW.

Regards,

Daniel

0 Kudos
Reply

1,201 Views
christinar
Contributor II

No I didn't refer to AN4975

Regards,

Christina

0 Kudos
Reply