May 12, 2016
05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 12, 2016
05:18 AM
Hi,
I found a bug in xmc_can.c.
Initialy the MOIPR was modified with the "set" value, by a = operation. This clears the Interrupt Node Pointers, and so Interrupts no longer trigger.
Below the fixed code.
Is it even necessary to modify the MPN in this function? By my understanding the value is tied to the MO-Nr, which stays constant.
I found a bug in xmc_can.c.
Initialy the MOIPR was modified with the "set" value, by a = operation. This clears the Interrupt Node Pointers, and so Interrupts no longer trigger.
Below the fixed code.
Is it even necessary to modify the MPN in this function? By my understanding the value is tied to the MO-Nr, which stays constant.
/* Initialization of XMC_CAN MO Object */
void XMC_CAN_MO_Config(const XMC_CAN_MO_t *const can_mo)
{
uint32_t reg;
/* Configure MPN */ // ***MODIFIED: mask MPN and OR newly calculated MPN to MOIPR or else you overwrite Interrupt Node Pointers
uint32_t num = ((uint32_t)(can_mo->can_mo_ptr) - CAN_BASE - 0x1000U)/0x0020U;
uint32_t set = (((uint32_t)(num/32) << (CAN_MO_MOIPR_MPN_Pos + 5U)) | ((uint32_t)(num%32) << CAN_MO_MOIPR_MPN_Pos));
can_mo->can_mo_ptr->MOIPR &= ~(511 << CAN_MO_MOIPR_MPN_Pos); // clear MPN
can_mo->can_mo_ptr->MOIPR |= set; // set MPN
...
}
- Tags:
- IFX
1 Reply
Not applicable
May 15, 2016
07:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 15, 2016
07:46 PM
Hi,
Thank you for your feedback. I have confirmed this with the developer and this will be updated as suggested in the next DAVE update in July.
In the meanwhile, an eTicket(#223383427 ) has been filed for this issue. It can be viewed from the link below.
https://www.infineonforums.com/support/dave3/index.php?option=com_maqmahelpdesk&Itemid=0&id_workgrou...
Regards,
Daryl
Thank you for your feedback. I have confirmed this with the developer and this will be updated as suggested in the next DAVE update in July.
In the meanwhile, an eTicket(#223383427 ) has been filed for this issue. It can be viewed from the link below.
https://www.infineonforums.com/support/dave3/index.php?option=com_maqmahelpdesk&Itemid=0&id_workgrou...
Regards,
Daryl