Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
Hello,
I am trying to communicate with PC using ecan module in 28075 and I use the 'can_external_transmit' example code for test. I changed the programme a little bit(set the CANTXD and CANRXD pin to GPIO 18 19 respectively and modify the relative interrupt setup to CANAINT0). My problem is:
For reception:When I transmit a frame from PC to the MCU through the transceiver, the interrupt can be successfully triggered, however, the INT0ID in CAN_INT register is always 0x8000 which should be somthing like 0x0001 or sth instead. So in ISR, no data is receiced even if my PC tells me a frame has been successfully sent.
Another stranger thing is : if I comment out this line 'CANMessageSet(CANA_BASE, RX_MSG_OBJ_ID, &sRXCANMessage,MSG_OBJ_TYPE_RX)', interrupt still works.Part of the programmed is attached below:
I am pretty sure the transceiver works because the transmit process from PC to MCU is ok.
I also tried the loop back example, which seems good.
I am very glad if someome can help me out.
thanks