<?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>topic Re: mpc5777c flexcan TX and RX interrupt callback function in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/mpc5777c-flexcan-TX-and-RX-interrupt-callback-function/m-p/1595593#M5457</link>
    <description>&lt;P&gt;Thank you for your support it's working now.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 13:04:18 GMT</pubDate>
    <dc:creator>Krishnayya</dc:creator>
    <dc:date>2023-02-08T13:04:18Z</dc:date>
    <item>
      <title>mpc5777c flexcan TX and RX interrupt callback function</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/mpc5777c-flexcan-TX-and-RX-interrupt-callback-function/m-p/1590497#M5431</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am using flexcan processor generated code to generate interrupt for both RX and TX.but the problem i am facing is when i tried use both Rx and tx callbacks simultaneously only tx is working fine and&amp;nbsp; when i do it separately both are working properly.could&amp;nbsp; anyone please guide what i am&amp;nbsp;doing wrong in using tx and rx callbacks and how to disable the callbacks once they served.&lt;/P&gt;&lt;P&gt;code is as below.&lt;/P&gt;&lt;P&gt;FLEXCAN_DRV_Init(INST_CAN_A, &amp;amp;can_A_State, &amp;amp;can_A_InitConfig0);&lt;/P&gt;&lt;P&gt;flexcan_data_info_t txInfo = { .msg_id_type = FLEXCAN_MSG_ID_STD,&lt;BR /&gt;.data_length = ((uint8_t) 8U), .is_remote = false };&lt;BR /&gt;FLEXCAN_DRV_ConfigTxMb(INST_CAN_A, 15, &amp;amp;txInfo, 0x2F2);&lt;BR /&gt;FLEXCAN_DRV_ConfigRxMb(INST_CAN_A, 14, &amp;amp;txInfo1, 0x301);&lt;BR /&gt;FLEXCAN_DRV_SetRxMaskType(INST_CAN_A, FLEXCAN_RX_MASK_INDIVIDUAL);&lt;BR /&gt;FLEXCAN_DRV_SetRxIndividualMask(INST_CAN_A, FLEXCAN_MSG_ID_STD, 14,&lt;BR /&gt;0xFFFFFFFF);&lt;BR /&gt;FLEXCAN_DRV_InstallEventCallback(INST_CAN_A, CAN_A_EventCallBack,&lt;BR /&gt;(void *) 0);&lt;BR /&gt;FLEXCAN_DRV_Receive(INST_CAN_A, 14, &amp;amp;CAN_A_RX_Buffer);&lt;BR /&gt;FLEXCAN_DRV_Receive(INST_CAN_A, 14, &amp;amp;CAN_A_TX_Buffer);&lt;BR /&gt;FLEXCAN_DRV_InstallEventCallback(INST_CAN_A, CAN_A_TX_EventCallBack,&lt;BR /&gt;(void *) 0);&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;void CAN_A_TX_EventCallBack(uint8_t instance, flexcan_event_type_t eventType,&lt;BR /&gt;uint32_t buffIdx, flexcan_state_t *flexcanState) {&lt;BR /&gt;if (eventType == FLEXCAN_EVENT_TX_COMPLETE) {&lt;BR /&gt;CAN_A_TX_Complete();&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void CAN_A_RX_EventCallBack(uint8_t instance, flexcan_event_type_t eventType,&lt;BR /&gt;uint32_t buffIdx, flexcan_state_t *flexcanState) {&lt;BR /&gt;if (eventType == FLEXCAN_EVENT_RX_COMPLETE) {&lt;BR /&gt;&lt;BR /&gt;CAN_A_RX_Complete();&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Thank you in advance for&amp;nbsp;your time .&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 10:18:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/mpc5777c-flexcan-TX-and-RX-interrupt-callback-function/m-p/1590497#M5431</guid>
      <dc:creator>Krishnayya</dc:creator>
      <dc:date>2023-01-31T10:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5777c flexcan TX and RX interrupt callback function</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/mpc5777c-flexcan-TX-and-RX-interrupt-callback-function/m-p/1592252#M5441</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you should install single even callback and use it e.g. this way&lt;/P&gt;
&lt;PRE&gt;FLEXCAN_DRV_InstallEventCallback(INST_CANCOM1,CAN_TX_RX_Callback, NULL);&lt;BR /&gt;&lt;BR /&gt;void CAN_TX_RX_Callback(uint8_t instance, flexcan_event_type_t eventType, uint32_t mb_num,&lt;BR /&gt;flexcan_state_t *flexcanState)&lt;BR /&gt;{&lt;BR /&gt;    (void)flexcanState;&lt;BR /&gt;    (void)instance;&lt;BR /&gt;&lt;BR /&gt;    switch(eventType)&lt;BR /&gt;    {    &lt;BR /&gt;       case FLEXCAN_EVENT_RX_COMPLETE:&lt;BR /&gt;       {&lt;BR /&gt;           /* process data from recvBuff1 */&lt;BR /&gt;&lt;BR /&gt;           /* enable receiving data in RX_MAILBOX again */&lt;BR /&gt;           // FLEXCAN_DRV_Receive(INST_CANCOM1, RX_MB1, &amp;amp;recvBuff1);&lt;BR /&gt;       }&lt;BR /&gt;       break;&lt;BR /&gt;       case FLEXCAN_EVENT_RXFIFO_COMPLETE:&lt;BR /&gt;       {&lt;BR /&gt;           /* process data from recvBuff2 */&lt;BR /&gt;&lt;BR /&gt;           /* enable receiving data in RX FIFO again */&lt;BR /&gt;           // FLEXCAN_DRV_RxFifo(INST_CANCOM1,&amp;amp;recvBuff2);&lt;BR /&gt;       }&lt;BR /&gt;       break;&lt;BR /&gt;       case FLEXCAN_EVENT_TX_COMPLETE:&lt;BR /&gt;       break;&lt;BR /&gt;       default:&lt;BR /&gt;       break;&lt;BR /&gt;    }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;MB interrupt (and so calling of callback as well) is disabled once serviced, until you call Receive/Send functions again so MB interrupt is enabled and called upon successful message reception/transmission.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 10:38:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/mpc5777c-flexcan-TX-and-RX-interrupt-callback-function/m-p/1592252#M5441</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2023-02-02T10:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5777c flexcan TX and RX interrupt callback function</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/mpc5777c-flexcan-TX-and-RX-interrupt-callback-function/m-p/1595593#M5457</link>
      <description>&lt;P&gt;Thank you for your support it's working now.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 13:04:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/mpc5777c-flexcan-TX-and-RX-interrupt-callback-function/m-p/1595593#M5457</guid>
      <dc:creator>Krishnayya</dc:creator>
      <dc:date>2023-02-08T13:04:18Z</dc:date>
    </item>
  </channel>
</rss>

