7i73 LCD shows rubisch

More
01 Mar 2018 16:07 #106812 by rene-dev
Replied by rene-dev on topic 7i73 LCD shows rubisch
can someone please try if this fixes the issue?
github.com/rene-dev/linuxcnc/tree/sserial-race-fix

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 16:16 - 01 Mar 2018 16:23 #106815 by andypugh
Replied by andypugh on topic 7i73 LCD shows rubisch
I was wondering if that was the answer, or whether we needed to keep the setup first and tag a separate DoIt write on the end.

I was thinking that the problem was here:
github.com/rene-dev/linuxcnc/blob/4f7110...tmot2/sserial.c#L968

ie, the DoIt is added to the TRAM list by the setup_channel function, not at the end of the setup_remotes function.
(They are called in this sequence here)
github.com/rene-dev/linuxcnc/blob/4f7110...tmot2/sserial.c#L802
Last edit: 01 Mar 2018 16:23 by andypugh.

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 16:37 #106816 by rene-dev
Replied by rene-dev on topic 7i73 LCD shows rubisch
Im not sure I understand what you see as the issue.
My change sets the cs with the do-it after setting the user registers.
that could be an issue if the fpga reads the user register while its written by the driver.
I verified the change of the order by looking at the packets.
now that I think about this issue, that doesnt explain why there is rubbish in the dump.
the data should be there, just in the wrong place.

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 16:48 #106818 by andypugh
Replied by andypugh on topic 7i73 LCD shows rubisch
It has been a long time since I looked at this, but I thought that the "DoIt" command was in the command register, not the CS register.

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 16:49 #106819 by andypugh
Replied by andypugh on topic 7i73 LCD shows rubisch
Before a DOIT command is written to start a data transfer cycle with the remote
device, the host must write its packed outgoing process data (OPD in table below) to the
interface registers. (The CS register not currently used for outgoing data/control so is not
written)

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 16:56 #106820 by rene-dev
Replied by rene-dev on topic 7i73 LCD shows rubisch
you are right, its in the cmd, not cs register. but the cmd register is also written before the data...

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 17:03 #106821 by andypugh
Replied by andypugh on topic 7i73 LCD shows rubisch
Yes.

But you are saying that your fix works?

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 17:03 #106822 by rene-dev
Replied by rene-dev on topic 7i73 LCD shows rubisch
so you suggest moving the hm2_sserial_setup_channel last in the sequence?

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 17:05 - 01 Mar 2018 17:06 #106823 by rene-dev
Replied by rene-dev on topic 7i73 LCD shows rubisch
I cant test if it works, because I have no issue.
Im only looking at the packets send by hm2_eth.
I do understand that do it should be set after the data is written, thats what im trying to do.
Last edit: 01 Mar 2018 17:06 by rene-dev.

Please Log in or Create an account to join the conversation.

More
01 Mar 2018 17:09 #106825 by andypugh
Replied by andypugh on topic 7i73 LCD shows rubisch

so you suggest moving the hm2_sserial_setup_channel last in the sequence?


That was my plan.

Or, possibly, to add a third function that appends just the command register. I am not clear if it is possible to setup the channel last.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.138 seconds
Powered by Kunena Forum