0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthrough

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Post Reply
WolleMS
MS/Extra Newbie
Posts: 8
Joined: Thu Apr 11, 2013 6:32 am

0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthrough

Post by WolleMS »

Hi,
I am developing a new CAN Device... Stand alone CAN-Polling from MS2 works well, also stand alone usage as CAN-Passthrough Device in Tuner Studio... Just when combining both methods i receive 0x8a (using 3.3Beta13, newserial) Protocol errors or if using 3.2.5 the whole serial communication breaks up (MS needs PowerCycle to resume serial communication)...

While using full polling (GPIO, PWM, ADC) i handle up to 6-700 messages/sec without problem... CAN-Passthrough AND simple Polling (just ADC) ends up with about 400msg/secs, so i dont think its a performance problem on my device.

I dont understand why these TimeOuts occur...

Regards,
Wolfgang
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by jsmcortina »

The timeout happens if the MS2 sent out a CAN message but did not receive the expected reply within a given period.

You likely need to enable and analyse "comm log debug" data in TunerStudio. Enable that, then look in the TunerStudioAppDebug.txt file.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by racingmini_mtl »

What are you trying to achieve by polling at that speed? You are polling faster than the refresh rate of the variables. Also adding more interrupts than needed to the MS2 could have an impact on the computations it has to do and on the timing accuracy. These will also depend on which wheel pattern you're using and what maximum RPM you're seeing.

As for your lower performance when using passthrough, are you reading or writing to your device? If you're reading, you have to take into account the request messages sent by the MS2 and the messages sent back by your device when are you counting the messages per second on the bus. That has a significant impact.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
WolleMS
MS/Extra Newbie
Posts: 8
Joined: Thu Apr 11, 2013 6:32 am

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by WolleMS »

@jean it´s not me polling at that speed... i only answer to MSG_REQ from MS... i was suprised at which high rate the MS asks for Data.... Same at the CAN Passthrough... i only answer the Runtime-Data-Requests from Tunerstudio...

@james Yes, i have took a look at the newserial routines, i know that there ist the ti>1000 Timeout... but i thought every incoming message would reset the counter... As far as i know there is no 1:1 Relation from Request to Answer...
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by racingmini_mtl »

Yeah, I was not thinking correctly when I wrote my message because I had in mind that you were talking about the frame rate and not the message rate.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
WolleMS
MS/Extra Newbie
Posts: 8
Joined: Thu Apr 11, 2013 6:32 am

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by WolleMS »

TunerStudio is polling my OutpC-Table (about 40bytes)... Sooner or later only some bytes are received and i got a 0x8a-Error. TunerStudio does a Retry and receives the Data... after serveral errors MS2 reports a "Dead CAN Devices" (because of the internal error count)....
jsmcortina wrote:The timeout happens if the MS2 sent out a CAN message but did not receive the expected reply within a given period.
Can you specify what is "the expected message", James ?

Regards,
Wolfgang
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by racingmini_mtl »

The expected message is the reply to the TS polling that the MS2 is forwarding to your device. That means that your device is not sending the data either fast enough or at all to at least some of the messages.

And just to be clear, this is very likely an issue on your side and not the MS2 or TS because I have never seen this error occur with any of my CAN devices either personally or from the dozens of other users. So you need to see if it is possible that your device could drop some of the messages that are sent to it. You can also check to see if lowering the data rate in TS has an effect.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
WolleMS
MS/Extra Newbie
Posts: 8
Joined: Thu Apr 11, 2013 6:32 am

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by WolleMS »

racingmini_mtl wrote: You can also check to see if lowering the data rate in TS has an effect.
I´d like to try... if you tell me how....

I´m sure that the error occurs on my side, i just want to be sure that there are no special messages i maybe forgot, CRC32 replies as example...
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by racingmini_mtl »

Communications menu, data rate.

And there is no CRC32 or other special messages coming on the CAN bus. You will only get requests for data for a specific table and offset.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
WolleMS
MS/Extra Newbie
Posts: 8
Joined: Thu Apr 11, 2013 6:32 am

Re: 0x8a CAN-TimeOuts, Serial Conn lost while CAN-Passthroug

Post by WolleMS »

Hi,
i have tested my old Sources again with the 3.4beta10 as i have read that the CAN procedures has been redesigned.

Now i dont get Errors anymore...

Thanx!
Post Reply