This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

can will not get receive envet.

using the can implementation below is giving me some strange results.

void CAN2_SignalObjectEvent (uint32_t obj_idx, uint32_t event) {

  if (event == ARM_CAN_EVENT_RECEIVE) {         // If receive event
    if (obj_idx == rx2_obj_idx) {                // If receive object event
      ptrCAN->MessageRead(rx2_obj_idx, &rx2_msg_info, rx2_data, 8U);
    }
  }

  if (event == ARM_CAN_EVENT_SEND_COMPLETE) {   // If send completed event
    if (obj_idx == tx2_obj_idx) {                // If transmit object event
      sendCompleted=true;
    }
  }
}

At times I get the ARM_CAN_EVENT_RECEIVE but more often then not this is not triggered. When it does work I get an rx2_obj_idx of 0. Not sure what 0 is when I have can1 and 2? My ECU i'm interfacing with is replying to my send command with in 3-8ms. Not sure if that is too fast or not, I doubt it. I do get my ARM_CAN_EVENT_SEND_COMPLETE every time.