lpcware

CAN receive problem with AOAA board

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by vaynard on Mon Feb 25 04:09:41 MST 2013
I am using 1769 to receive some message from 11c24. The message seems to have sent successfully from the 11c24, but I can't receive it on 1769. I modify the demo_aoa_basic project, here is the code from 11c24 and 1769:


Quote: 11c24
        tx_obj.mode_id = 0x10;
        tx_obj.msgobj = 0; // RPM
        tx_obj.mask=0;
        tx_obj.data[0]= CANPT_NODE_UNIQUE_ID;
        tx_obj.data[1]=ID;
        tx_obj.data[2]=data;
        tx_obj.dlc =datalen+1;
        (*rom)->pCAND->can_transmit(&tx_obj);




Quote: 1769
void canpt_task(void)
{
  CAN_MSG_Type *msg;

  if (!q_isEmpty()) {

    msg = q_get();

  int ID = msg->dataA[1];
  int data=msg->dataA[2];    switch (ID){
    case 0x01:
        printf("%d \n",(&data));
        break;
    case 0x02:
        printf("%d \n",(&data));
        break;
    }
  }

  if (numNodes > 0) {
    checkIfNodesAlive();
  }

}



the program seems to never entered the CAN interrupt handler on LPC1769 side. does anybody know the solution to this?

Outcomes