<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MPC5xxx中的主题 Re: Inconsistent CAN reception Issue</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971106#M26809</link>
    <description>Hello Petr,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;could you please provide the example code to resolve my issue.&lt;BR /&gt;Requirement: Each ISR shall hit on successful reception of the respective messages.&lt;BR /&gt;please its very urgent</description>
    <pubDate>Thu, 10 Oct 2024 07:28:57 GMT</pubDate>
    <dc:creator>Anilpatil_SasvaAuto</dc:creator>
    <dc:date>2024-10-10T07:28:57Z</dc:date>
    <item>
      <title>Inconsistent CAN reception Issue</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1969942#M26794</link>
      <description>&lt;P&gt;Subject: Inconsistent CAN Message Reception Issue&lt;/P&gt;&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;I am encountering an issue with receiving CAN messages consistently. I have configured 4 message buffers (MBs) to receive 4 Rx messages.&lt;/P&gt;&lt;P&gt;Issue:&lt;BR /&gt;Observation 1: When I send the first message (0x301) from the IG block in the CANOE tool, the MPC5748G micro can receive the message, and the respective ISR hits. However, if I send the same message again, the ISR does not hit at any time.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Observation 2: Following observation 1, if I send the second message (0x302), the MPC5748G micro can receive the message, and the respective ISR hits. If I send the first message again, the ISR hits, but subsequent attempts to send the same message do not trigger the ISR.&lt;/P&gt;&lt;P&gt;Observation 3: If the same message is sent successively, none of the ISRs will be triggered repeatedly. However, sending four different messages one by one will trigger the respective ISRs.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Your help with this issue would be greatly appreciated. Please provide the solution on urgent basis.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please review the following functions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.CAN Initialization function:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;void Can_InitCAN0 (void)&lt;BR /&gt;{&lt;BR /&gt;uint8_t index;&lt;/P&gt;&lt;P&gt;CAN_0.MCR.B.MDIS = 1; /* Disable module before selecting clock source*/&lt;BR /&gt;CAN_0.CTRL1.B.CLKsrc=0; /* Clock Source = oscillator clock (40 MHz) */&lt;BR /&gt;CAN_0.MCR.B.MDIS = 0; /* Enable module for config. (Sets FRZ, HALT)*/&lt;/P&gt;&lt;P&gt;while (!CAN_0.MCR.B.FRZACK) {}/* Wait for freeze acknowledge to set */&lt;BR /&gt;/* Good practice: wait for FRZACK on freeze mode entry/exit */&lt;/P&gt;&lt;P&gt;CAN_0.CTRL1.R = 0x04DB0086; /* CAN bus: 40 MHz clksrc, 500 kbps with 16 tq */ // 0x27590000&lt;BR /&gt;/* PRESDIV+1 = Fclksrc/Ftq = 40 MHz/8MHz = 5 */&lt;BR /&gt;/* so PRESDIV = 4 */&lt;BR /&gt;/* PSEG2 = Phase_Seg2 - 1 = 4 - 1 = 3 */&lt;BR /&gt;/* PSEG1 = PSEG2 = 3 */&lt;BR /&gt;/* PROPSEG= Prop_Seg - 1 = 7 - 1 = 6 */&lt;BR /&gt;/* RJW = Resync Jump Width - 1 = 4 = 1 */&lt;BR /&gt;/* SMP = 1: use 3 bits per CAN sample */&lt;BR /&gt;/* CLKsrc=0 (unchanged): Fcanclk= Fxtal= 40 MHz*/&lt;/P&gt;&lt;P&gt;CAN_0.MCR.R |= CAN_MCR_FRZ | CAN_MCR_HALT; /* enabled to enter Freeze mode */&lt;/P&gt;&lt;P&gt;while (0 == CAN_0.MCR.B.FRZACK){};&lt;BR /&gt;while (0 == CAN_0.MCR.B.NOTRDY){}; /* double check that we are actually in freeze mode */&lt;/P&gt;&lt;P&gt;CAN_0.MCR.B.IRMQ = 1; /* Individual Rx Masking And Queue Enable */&lt;BR /&gt;#ifdef CAN_0_LOOP_BACK_ENABLED&lt;BR /&gt;CAN_0.MCR.B.SRXDIS = 0; /* Self Reception Enable */&lt;BR /&gt;#else&lt;BR /&gt;CAN_0.MCR.B.SRXDIS = 1; /* Self Reception Disable */&lt;BR /&gt;#endif&lt;BR /&gt;CAN_0.MCR.B.RFEN = 0; /* RX FIFO Disabled */&lt;BR /&gt;CAN_0.MCR.B.AEN = 1; /* Abort Enabled */&lt;BR /&gt;CAN_0.MCR.B.FDEN = 0; /* CAN-FD Enabled */&lt;BR /&gt;CAN_0.MCR.B.IDAM = 0; /* ID Acceptance Mode is one full ID */&lt;BR /&gt;CAN_0.MCR.B.MAXMB = 0x3F; /* 64 MBs */&lt;/P&gt;&lt;P&gt;CAN_0.CTRL1.B.SMP = 1; /* SMP = 1: use 3 bits per CAN sample */&lt;BR /&gt;#ifdef CAN_0_LOOP_BACK_ENABLED&lt;BR /&gt;CAN_0.CTRL1.B.LPB = 1; /* Loopback Enabled */&lt;BR /&gt;#else&lt;BR /&gt;CAN_0.CTRL1.B.LPB = 0; /* Loopback Disabled */&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;for (index=0; index&amp;lt;96; index++)&lt;BR /&gt;{&lt;BR /&gt;CAN_0.MB[index].CS.R = 0; /* Inactivate all 96 message buffers */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/****Disable CAN FD****/&lt;BR /&gt;#if 0&lt;BR /&gt;CAN_0.FDCTRL.B.FDRATE = 1; /* Flexible Data Rate Enabled */&lt;BR /&gt;CAN_0.FDCTRL.B.MBDSR0 = 0; /* MB data size for R0 is 8 Bytes */&lt;BR /&gt;CAN_0.FDCTRL.B.MBDSR1 = 3; /* MB data size for R1 is 64 Bytes */&lt;BR /&gt;CAN_0.FDCTRL.B.MBDSR2 = 3; /* MB data size for R2 is 64 Bytes */&lt;/P&gt;&lt;P&gt;CAN_0.CBT.R = 0x80242844; /* Bit timing parameters */&lt;BR /&gt;CAN_0.FDCBT.R = 0x001614C6; /* Bit timing parameters */&lt;BR /&gt;#endif&lt;BR /&gt;for (index=0; index&amp;lt;96; index++)&lt;BR /&gt;{&lt;BR /&gt;CAN_0.RXIMR[index].R = 0x1FFFFFFF; /* RX Individual Mask is set to check all bits with MB ID */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;CAN_0.RXIMR[45].R = 0; /* MB 45 used for TX */&lt;/P&gt;&lt;P&gt;/* enable interrupt for MB45 - Transmit complete Interrupt */&lt;BR /&gt;CAN_0.IMASK2.R |= 1U &amp;lt;&amp;lt; 13U;&lt;/P&gt;&lt;P&gt;Can_InitCAN0RxMsgBuffers ();&lt;/P&gt;&lt;P&gt;CAN_0.RXMGMASK.R = 0x1FFFFFFF;&lt;/P&gt;&lt;P&gt;INTC.PSR[568].B.PRC_SELN = 0x8;&lt;BR /&gt;INTC.PSR[568].B.PRIN = 12;&lt;/P&gt;&lt;P&gt;INTC.PSR[569].B.PRC_SELN = 0x8;&lt;BR /&gt;INTC.PSR[569].B.PRIN = 12;&lt;/P&gt;&lt;P&gt;INTC.PSR[570].B.PRC_SELN = 0x8;&lt;BR /&gt;INTC.PSR[570].B.PRIN = 12;&lt;/P&gt;&lt;P&gt;INTC.PSR[571].B.PRC_SELN = 0x8;&lt;BR /&gt;INTC.PSR[571].B.PRIN = 12;&lt;/P&gt;&lt;P&gt;INTC.PSR[572].B.PRC_SELN = 0x8;&lt;BR /&gt;INTC.PSR[572].B.PRIN = 12;&lt;/P&gt;&lt;P&gt;INTC.PSR[573].B.PRC_SELN = 0x8;&lt;BR /&gt;INTC.PSR[573].B.PRIN = 12;&lt;/P&gt;&lt;P&gt;Can0PortInit ();&lt;/P&gt;&lt;P&gt;/*CAN_0.CTRL2.R |= 0x00001000u; // ISOCANFD Enabled*/&lt;/P&gt;&lt;P&gt;CAN_0.IFLAG1.R = 0xFFFFFFFFU;&lt;BR /&gt;CAN_0.IFLAG2.R = 0xFFFFFFFFU;&lt;/P&gt;&lt;P&gt;/* enable the FlexCAN module, reset and freeze */&lt;BR /&gt;CAN_0.MCR.R &amp;amp;= ~(CAN_MCR_FRZ | CAN_MCR_HALT);&lt;/P&gt;&lt;P&gt;while (CAN_0.MCR.B.FRZACK &amp;amp; CAN_0.MCR.B.NOTRDY) {} /* Wait to clear */&lt;BR /&gt;/* Good practice: wait for FRZACK on freeze mode entry/exit */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;2.CAN ISR for&amp;nbsp;4 MBs are as below:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;void Can_MsgBuf0003ISR (void)&lt;BR /&gt;{&lt;BR /&gt;uint8 Channel;&lt;BR /&gt;uint8 ReturnValue = 0U;&lt;BR /&gt;uint32 RegValue;&lt;/P&gt;&lt;P&gt;Channel = 0U;&lt;/P&gt;&lt;P&gt;if (0U != (CAN_0.IFLAG1.R &amp;amp; (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB)))&lt;BR /&gt;{&lt;BR /&gt;ReturnValue |= Can_RxMsg ( Channel, Can_RxMsgBufConfig[Channel].MsgPtr);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Channel = 1U;&lt;BR /&gt;if (0U != (CAN_0.IFLAG1.R &amp;amp; (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB)))&lt;BR /&gt;{&lt;BR /&gt;ReturnValue |= Can_RxMsg ( Channel, Can_RxMsgBufConfig[Channel].MsgPtr);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Channel = 2U;&lt;BR /&gt;if (0U != (CAN_0.IFLAG1.R &amp;amp; (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB)))&lt;BR /&gt;{&lt;BR /&gt;ReturnValue |= Can_RxMsg ( Channel, Can_RxMsgBufConfig[Channel].MsgPtr);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Channel = 3U;&lt;BR /&gt;if (0U != (CAN_0.IFLAG1.R &amp;amp; (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB)))&lt;BR /&gt;{&lt;BR /&gt;ReturnValue |= Can_RxMsg ( Channel, Can_RxMsgBufConfig[Channel].MsgPtr);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;3.Message buffers initialization function:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;void Can_InitCAN0RxMsgBuffers (void)&lt;BR /&gt;{&lt;BR /&gt;uint8 MsgIndex;&lt;BR /&gt;uint32 StandardID;&lt;/P&gt;&lt;P&gt;for (MsgIndex=0; MsgIndex &amp;lt; NUM_OF_RX_MSGS; MsgIndex++)&lt;BR /&gt;{&lt;BR /&gt;StandardID = Can_RxMsgBufConfig[MsgIndex].StdID;&lt;/P&gt;&lt;P&gt;*((uint32 *)(CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[MsgIndex].MBAddrOffset)) = MB_CS_SET_EDL | MB_CS_SET_BRS | MB_CS_CODE_INACTIVE | MB_CS_STD_IDE;&lt;/P&gt;&lt;P&gt;*((uint32 *)(CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[MsgIndex].MBAddrOffset + 4U)) = MB_STD_ID &amp;amp; (StandardID &amp;lt;&amp;lt; 18);&lt;/P&gt;&lt;P&gt;*((uint32 *)(CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[MsgIndex].MBAddrOffset)) |= MB_CS_CODE_EMPTY;&lt;/P&gt;&lt;P&gt;if (Can_RxMsgBufConfig[MsgIndex].MB &amp;lt; 32U)&lt;BR /&gt;{&lt;BR /&gt;CAN_0.IMASK1.R |= 1 &amp;lt;&amp;lt; Can_RxMsgBufConfig[MsgIndex].MB;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;CAN_0.IMASK2.R |= 1 &amp;lt;&amp;lt; (Can_RxMsgBufConfig[MsgIndex].MB - 32U);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4.Receive_Msg() function:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;uint8 Can_RxMsg (uint8 Channel, Can_MsgType * Msg)&lt;BR /&gt;{&lt;BR /&gt;uint32 IFlag;&lt;BR /&gt;uint8 *P8CAN0RxMBData;&lt;BR /&gt;uint8 Index;&lt;BR /&gt;uint8 ReturnValue = 0U;&lt;/P&gt;&lt;P&gt;if (Channel &amp;lt; NUM_OF_RX_MSGS)&lt;BR /&gt;{&lt;BR /&gt;if (Can_RxMsgBufConfig[Channel].MB &amp;lt; 32U)&lt;BR /&gt;{&lt;BR /&gt;IFlag = CAN_0.IFLAG1.R &amp;amp; (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;IFlag = CAN_0.IFLAG2.R &amp;amp; (1U &amp;lt;&amp;lt; (Can_RxMsgBufConfig[Channel].MB - 32U));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (0U != IFlag)&lt;BR /&gt;{&lt;BR /&gt;Msg-&amp;gt;StdID = ((*((uint32 *)(CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[Channel].MBAddrOffset + 4U))) &amp;amp; MB_STD_ID) &amp;gt;&amp;gt; 18;&lt;/P&gt;&lt;P&gt;Msg-&amp;gt;DLC = ((*((uint32 *)(CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[Channel].MBAddrOffset))) &amp;amp; MB_CS_DLC) &amp;gt;&amp;gt; 16;&lt;/P&gt;&lt;P&gt;Msg-&amp;gt;NoOfBytes = Can_CalcNoOfBytes (Msg-&amp;gt;DLC);&lt;/P&gt;&lt;P&gt;P8CAN0RxMBData = (uint8 *) (CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[Channel].MBAddrOffset + 8U);&lt;/P&gt;&lt;P&gt;for (Index=0; Index &amp;lt; Msg-&amp;gt;NoOfBytes; Index++)&lt;BR /&gt;{&lt;BR /&gt;Msg-&amp;gt;Payload[Index] = *(P8CAN0RxMBData + Index); /* Load data to be transmitted */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (Can_RxMsgBufConfig[Channel].MB &amp;lt; 32U)&lt;BR /&gt;{&lt;BR /&gt;CAN_0.IFLAG1.R = (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;CAN_0.IFLAG2.R = (1U &amp;lt;&amp;lt; (Can_RxMsgBufConfig[Channel].MB - 32U));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;LED_DS7 = ~LED_DS7;&lt;/P&gt;&lt;P&gt;Msg-&amp;gt;MsgRcvd++;&lt;/P&gt;&lt;P&gt;ReturnValue = 1U;&lt;/P&gt;&lt;P&gt;CAN_0.IFLAG1.R = 0xFFFFFFFFU;&lt;BR /&gt;CAN_0.IFLAG2.R = 0xFFFFFFFFU;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return (ReturnValue);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5.Unmask Interrupt function:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;void Can_UnMaskInterrupt (uint8 Channel, uint32 RegValue)&lt;BR /&gt;{&lt;BR /&gt;uint8 IntrID = Can_RxMsgBufConfig[Channel].IntrID;&lt;/P&gt;&lt;P&gt;switch (IntrID)&lt;BR /&gt;{&lt;BR /&gt;case 0U : CAN_0.IMASK1.R = RegValue;&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 1U : CAN_0.IMASK1.R = RegValue;&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 2U : CAN_0.IMASK1.R = RegValue;&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 3U : CAN_0.IMASK1.R = RegValue;&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 4U : CAN_0.IMASK1.R = RegValue;&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 5U : CAN_0.IMASK2.R = RegValue;&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;default : break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6.Mask Interrupt function:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;uint32 Can_MaskInterrupt (uint8 Channel)&lt;BR /&gt;{&lt;BR /&gt;uint32 RegValue;&lt;BR /&gt;uint8 IntrID = Can_RxMsgBufConfig[Channel].IntrID;&lt;/P&gt;&lt;P&gt;switch (IntrID)&lt;BR /&gt;{&lt;BR /&gt;case 0U : RegValue = CAN_0.IMASK1.R;&lt;BR /&gt;CAN_0.IMASK1.R &amp;amp;= 0xFFFFFFF0U; // MB 0-3&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 1U : RegValue = CAN_0.IMASK1.R;&lt;BR /&gt;CAN_0.IMASK1.R &amp;amp;= 0xFFFFFF0FU; // MB 4-7&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 2U : RegValue = CAN_0.IMASK1.R;&lt;BR /&gt;CAN_0.IMASK1.R &amp;amp;= 0xFFFFF0FFU; // MB 8-11&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 3U : RegValue = CAN_0.IMASK1.R;&lt;BR /&gt;CAN_0.IMASK1.R &amp;amp;= 0xFFFF0FFFU; // MB 12-15&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 4U : RegValue = CAN_0.IMASK1.R;&lt;BR /&gt;CAN_0.IMASK1.R &amp;amp;= 0x0000FFFFU; // MB 16 - 31&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;case 5U : RegValue = CAN_0.IMASK2.R;&lt;BR /&gt;CAN_0.IMASK2.R &amp;amp;= 0x00000000U; // MB 32+ ... including MB 45 used for TX&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;default : break;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return RegValue;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 12:25:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1969942#M26794</guid>
      <dc:creator>Anilpatil_SasvaAuto</dc:creator>
      <dc:date>2024-10-09T12:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CAN reception Issue</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971097#M26808</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;a behavior is due to way you unlock MB. The MB is locked when reading its Control&amp;amp;Status word, it is unlocked when user read free running timer register or read another MB's CS word. When MB is locked it is not free to receive. Read chapter&amp;nbsp;43.5.7.3 Mailbox lock mechanism for more info.&lt;BR /&gt;As you do not unlock MB globally, using CAN_TIMER read, then the MB will get new message once another one is serviced, that is your observation 3.&lt;BR /&gt;So add reading&amp;nbsp;CAN_TIMER after MB is serviced in your &lt;SPAN&gt;Can_RxMsg&amp;nbsp;function.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;And remove &lt;SPAN&gt;CAN_0.IFLAG1.R = 0xFFFFFFFFU;&lt;/SPAN&gt;&lt;SPAN&gt;CAN_0.IFLAG2.R = 0xFFFFFFFFU; lines at the end as it can also clear other asserted flags. Clear just flag for serviced MB.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 07:15:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971097#M26808</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2024-10-10T07:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CAN reception Issue</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971106#M26809</link>
      <description>Hello Petr,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;could you please provide the example code to resolve my issue.&lt;BR /&gt;Requirement: Each ISR shall hit on successful reception of the respective messages.&lt;BR /&gt;please its very urgent</description>
      <pubDate>Thu, 10 Oct 2024 07:28:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971106#M26809</guid>
      <dc:creator>Anilpatil_SasvaAuto</dc:creator>
      <dc:date>2024-10-10T07:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CAN reception Issue</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971114#M26810</link>
      <description>how to read the CAN_TIMER after MB</description>
      <pubDate>Thu, 10 Oct 2024 07:35:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971114#M26810</guid>
      <dc:creator>Anilpatil_SasvaAuto</dc:creator>
      <dc:date>2024-10-10T07:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CAN reception Issue</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971118#M26811</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;try below function&lt;/P&gt;
&lt;P&gt;uint8 Can_RxMsg (uint8 Channel, Can_MsgType * Msg)&lt;BR /&gt;{&lt;BR /&gt;uint32 IFlag, dummy;&lt;BR /&gt;uint8 *P8CAN0RxMBData;&lt;BR /&gt;uint8 Index;&lt;BR /&gt;uint8 ReturnValue = 0U;&lt;/P&gt;
&lt;P&gt;if (Channel &amp;lt; NUM_OF_RX_MSGS)&lt;BR /&gt;{&lt;BR /&gt;if (Can_RxMsgBufConfig[Channel].MB &amp;lt; 32U)&lt;BR /&gt;{&lt;BR /&gt;IFlag = CAN_0.IFLAG1.R &amp;amp; (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;IFlag = CAN_0.IFLAG2.R &amp;amp; (1U &amp;lt;&amp;lt; (Can_RxMsgBufConfig[Channel].MB - 32U));&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;if (0U != IFlag)&lt;BR /&gt;{&lt;BR /&gt;Msg-&amp;gt;StdID = ((*((uint32 *)(CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[Channel].MBAddrOffset + 4U))) &amp;amp; MB_STD_ID) &amp;gt;&amp;gt; 18;&lt;/P&gt;
&lt;P&gt;Msg-&amp;gt;DLC = ((*((uint32 *)(CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[Channel].MBAddrOffset))) &amp;amp; MB_CS_DLC) &amp;gt;&amp;gt; 16;&lt;/P&gt;
&lt;P&gt;Msg-&amp;gt;NoOfBytes = Can_CalcNoOfBytes (Msg-&amp;gt;DLC);&lt;/P&gt;
&lt;P&gt;P8CAN0RxMBData = (uint8 *) (CAN0_BASE_REG_ADDR + Can_RxMsgBufConfig[Channel].MBAddrOffset + 8U);&lt;/P&gt;
&lt;P&gt;for (Index=0; Index &amp;lt; Msg-&amp;gt;NoOfBytes; Index++)&lt;BR /&gt;{&lt;BR /&gt;Msg-&amp;gt;Payload[Index] = *(P8CAN0RxMBData + Index); /* Load data to be transmitted */&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;if (Can_RxMsgBufConfig[Channel].MB &amp;lt; 32U)&lt;BR /&gt;{&lt;BR /&gt;CAN_0.IFLAG1.R = (1U &amp;lt;&amp;lt; Can_RxMsgBufConfig[Channel].MB);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;CAN_0.IFLAG2.R = (1U &amp;lt;&amp;lt; (Can_RxMsgBufConfig[Channel].MB - 32U));&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;dummy =&amp;nbsp;CAN_0.TIMER.R;&amp;nbsp; // unlock MB globally&lt;/P&gt;
&lt;P&gt;LED_DS7 = ~LED_DS7;&lt;/P&gt;
&lt;P&gt;Msg-&amp;gt;MsgRcvd++;&lt;/P&gt;
&lt;P&gt;ReturnValue = 1U;&lt;/P&gt;
&lt;P&gt;//CAN_0.IFLAG1.R = 0xFFFFFFFFU;&lt;BR /&gt;//CAN_0.IFLAG2.R = 0xFFFFFFFFU;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;return (ReturnValue);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 07:38:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971118#M26811</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2024-10-10T07:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CAN reception Issue</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971127#M26812</link>
      <description>Thanks for your support.&lt;BR /&gt;Somewhat working. I will let you know the behavior after the complete testing.</description>
      <pubDate>Thu, 10 Oct 2024 07:47:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Inconsistent-CAN-reception-Issue/m-p/1971127#M26812</guid>
      <dc:creator>Anilpatil_SasvaAuto</dc:creator>
      <dc:date>2024-10-10T07:47:16Z</dc:date>
    </item>
  </channel>
</rss>

