cancel
Showing results for 
Search instead for 
Did you mean: 

Can-Bus problem

truf9
Associate II
Posted on February 15, 2008 at 10:35

Can-Bus problem

2 REPLIES 2
truf9
Associate II
Posted on May 17, 2011 at 09:49

Hello,

I use the STR91x library for can-bus communication.

The receiving messages are handled in the CAN-interrupt. The transmission is made in the main-program.

I have following messages:

1) Transmit messages (for example ID 581)

1) Receive messages (for example ID 601)

3) message for the remote frame is configured as receive-message for

guarding (for example ID 701)

The request of remote frame runs over 1000000 messages without lost of a message.

Now the problem:

If a receive message (601) came short before remote frame , the receive message (601) is requested with the related transmit message (581), but it could be, that the transmit-message for the remote frame isn't on the bus.

I included counters for receving and transmitting remote frame. The message is not on the bus, but the sendmessage-routine is executed without errors. The counters are correct.

I don't know how to solve this problem.

I work with Keil uVision.

Best Regards,

TRuf

truf9
Associate II
Posted on May 17, 2011 at 09:49

Hello,

I have downloaded the new ST-Library V2.0. The problem decscribed at 11.02.08 is solved. But now I have a problem with the data of sendmessage.

I toggle the transmitted data for CanOpen-Guarding.

With the new STR91x.lib sendmessage transmit the old data in the message-buffer and not with the toggled Bit from software.

I think thats's a problem of the library.

In the old library CAN_SendMessage handles allways Message-object[0] and CAN_ReceiveMessage allways Message-object[1].

In the V2.0 of STR91x.lib CAN_SendMessage calls CAN_UpdateMsgObj() and CAN_TransmitRequest().

CAN_UpdateMsgObj() writes the data of the message in Message-object[0]. CAN_TransmitRequest() calls msg_if = GetFreeIF() and transmit the data of

Message-object[msg_if]. If msg_if=1 the false data are transmitted.

Could this the problem for false data with sendmessage???

Best Regards