Error while re-transmitting data via CAN between two MC9S12XEP100

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error while re-transmitting data via CAN between two MC9S12XEP100

855 Views
harshal_pawar
Contributor III

I am working on establishing communication between two MC9S12XEP100 controllers using CAN MAX3050ASA+ interface.

Case 1:

The data is transmitted on key press event from First board and received using interrupt at second board and it also displayed on GLCD display (Display is at Secondary side)

Its working fine.

Case 2:

When I updated the same code for receiving data at second board and re-transmitting it to first board neither values are updating on display nor receiving at Tx side (i.e. first board).

Code Workflow for Case 1:

At Tx:

1. In infinite loop check for key press event

2. If Yes, the Check for empty buffer

3. Select empty buffer

4. Create message

5. Make Buffer Ready

6. Check transmission status

At Rx:

1. In receive ISR, get the data transmitted from first board & display it on GLCD

Code Workflow for Case 2:

At Tx:

Step 1 to 6 are same

7. Receive ISR for the re-transmitted data from second borad

At Rx:

1. In receive ISR get the data transmitted from first board & display it on GLCD

2. Re-transmit the same data as an acknoledgement as per following steps:

3. Check for empty buffer

4. Select empty buffer

5. Create message

6. Make Buffer Ready

7. Check transmission status

Labels (1)
0 Kudos
Reply
1 Reply

741 Views
harshal_pawar
Contributor III

The issue has been resolved. There was a mistake in code. Now the system is working fine.

0 Kudos
Reply