Hello,
We are working with TDA4 EVM and PSDK 6.1.x.x.
We have modified the app_tidl_avp demo application by:
(1) calling appRemoteServiceRun at the end of each frame
(2) adding code to sequentially transmit and then receive CAN messages on MCU2_1 (see below).
appInit() { ... /* Enable Interrupts */ MCAN_enableIntr(gMcanModAddr, MCAN_INTR_MASK_ALL, (uint32_t)TRUE); MCAN_enableIntr(gMcanModAddr, MCAN_INTR_SRC_RES_ADDR_ACCESS, (uint32_t)FALSE); /* Select Interrupt Line */ MCAN_selectIntrLine(gMcanModAddr, MCAN_INTR_MASK_ALL, MCAN_INTR_LINE_NUM_0); ... } MCAN2RemoteServiceHandler { /* Enable Interrupt Line */ MCAN_enableIntrLine(gMcanModAddr, MCAN_INTR_LINE_NUM_0, 1U); /* Enable Transmission interrupt */ status = MCAN_txBufTransIntrEnable(gMcanModAddr, 1U, (uint32_t)TRUE); /* code to transmit CAN message */ /* Select Interrupt Line */ MCAN_selectIntrLine(gMcanModAddr, MCAN_INTR_MASK_ALL, MCAN_INTR_LINE_NUM_1); /* Enable Interrupt Line */ MCAN_enableIntrLine(gMcanModAddr, MCAN_INTR_LINE_NUM_1, 1U); /* code to receive CAN message */ }
This code is referred from the MCAN EVM Loopback example.
In this application, if we only enable Tx or Rx at a time, the app works fine.
But if we enable both, as shown below, then for the very first frame, the CAN messages are transmitted properly, but CAN Rx does not proceed and app hangs.
Is it possible to run both Tx and Rx on the same MCAN2 module in this fashion?
Thank you.