Vector #: 141 0x8d Offset : 564 0x234

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

Vector #: 141 0x8d Offset : 564 0x234

1,229 Views
MQXuser
Contributor III

I am having Unhandled interrupts:

 

*** UNHANDLED INTERRUPT ***

void Start_CAN(uint_32 RxIdentifier){   uint_32 result;   _bsp_flexcan_io_init(0);   CAN_LBK_OFF;//Hardware specific   RSE0_ON; //Hardware specific   result = FLEXCAN_Softreset ( CAN_DEVICE);   result = FLEXCAN_Initialize ( CAN_DEVICE, 0, 0, 250, FLEXCAN_IPBUS_CLK);   result = FLEXCAN_Select_mode( CAN_DEVICE, FLEXCAN_NORMAL_MODE);   result = FLEXCAN_Set_global_stdmask (CAN_DEVICE, 0x222 );   result = FLEXCAN_Error_int_enable(CAN_DEVICE);   result = FLEXCAN_Install_isr_err_int( CAN_DEVICE, (pointer)FlexCAN_ISR );   result = FLEXCAN_Install_isr_boff_int( CAN_DEVICE, (pointer)FlexCAN_ISR  );     FLEXCAN_Initialize_mailbox( CAN_DEVICE, 4, 0x21/*Direccion Destino*/,  8, FLEXCAN_TX, FLEXCAN_STANDARD, FLEXCAN_ENABLE);   FLEXCAN_Activate_mailbox(CAN_DEVICE, 4, FLEXCAN_TX_MSG_BUFFER_NOT_ACTIVE);   FLEXCAN_Install_isr( CAN_DEVICE, 4, (pointer)FlexCAN_ISR  );   FLEXCAN_Set_global_stdmask(CAN_DEVICE, 0xFFFFFFFF);     result = FLEXCAN_Initialize_mailbox(CAN_DEVICE, 0, RxIdentifier,8, FLEXCAN_RX, FLEXCAN_STANDARD, FLEXCAN_ENABLE);   result = FLEXCAN_Activate_mailbox(CAN_DEVICE, 0, FLEXCAN_RX_MSG_BUFFER_EMPTY);   result = FLEXCAN_Install_isr( CAN_DEVICE, 0, (pointer)FlexCAN_ISR );       result = FLEXCAN_Initialize_mailbox(CAN_DEVICE, 1, BROADCAST,8, FLEXCAN_RX, FLEXCAN_STANDARD, FLEXCAN_ENABLE);   result = FLEXCAN_Activate_mailbox(CAN_DEVICE, 1, FLEXCAN_RX_MSG_BUFFER_EMPTY);   result = FLEXCAN_Install_isr( CAN_DEVICE, 1, (pointer)FlexCAN_ISR );} /* EndBody */

 


Vector #: 141  0x8d
Offset  : 564  0x234
Task Id: 0x10003 Td_ptr 0x1003c000 Stack Frame: 0x20006ca4
Interrupt_nesting level: 2   PC: 0x00030e82   SR: 0x2300

 

 

If I am right, this corresponds to the MCF5225_INT_FLEXCAN_BUF5 interrupt, I am not installing buffer 5 interrupt, therefore I dont see where the problem is. This is my initialization code, what could be causing the problem?

 

 

Thanks

 


0 Kudos
3 Replies

286 Views
PetrM
Senior Contributor I

Well this sounds scary...

I can see that another interrupt was interrupted. What are you doing in the CAN ISR? And what ISR was interrupted?

Are you sure you don't mess somehow with CAN registers anywhere? Perhaps some memory access violation? 

Can you also check whether you receive message into any of your activated mailboxes when this happens? You can use TAD or CW register dump for that.

 

PetrM

 

0 Kudos

286 Views
MQXuser
Contributor III

Yes, I am having a trouble finding the source of the problem. Let me ask you the following thing:

 

If I have a couple (or more Transmit MailBoxes) ,  Can they be used by different tasks without the need of mutexes?

 

0 Kudos

286 Views
PetrM
Senior Contributor I

This maybe the issue.

You have to use mutexes (or lwsemaphores) in that case, because those tasks together could access the CAN registers in inappropriate way (sequence).

Maybe you should introduce one CAN communication task and consider messages/events/etc when using this task by other tasks.

 

PetrM

 

0 Kudos