Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsProblem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1727670/#msg_1727670
The compilation of forte was made including the module sysfs.
We already know that the hardware runs properly due to we checked it wit the following instructions:
Led:
echo 8 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio8/direction
echo 0 > /sys/class/gpio/gpio8/value
echo 1 > /sys/class/gpio/gpio8/value
button:
You can check these photos:
the correct voltages are 3.3 V and 0 v.
otherwise the program works perfectly in forte-ide, several tests were performed:
virtualization module as seen in the following post:
a test was also conducted with the flip-flop and not working properly either, as you can see:
You can also check the ./forte command is launched with root privileges with the sudo command.
Also perform the render sequence discussed in this post
does anyone know what may be the mistake?I do not know what else can I try.]]>investigacioncp15103 uva2016-03-24T22:58:04-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1727904/#msg_1727904
1. Regarding the connections, it seems that everything is fine, but the mapping between pin numbers and GPIO seems not to be right. You marked:
- Pin number 13 -> GPIO 2 -> Button
- Pin number 3 -> GPIO 8 -> LED
2. Once the GPIO numbers are correctly detected, check through ssh like you did (echoing to export, direction and value) to test the LED and Button (the button part you forgot to write in your post, but it would be the same, but reading the value file instead of writing to it). The value echoed to the export file should be the GPIO and not the header pin number, just to be clear.
3. If the button doesn't work, try using a 5 V output instead of 3.3 V. If the LED doesn't work, maybe you could try another pin that is not shared (in this case, pin number 3 is used also by I2C).
4. When both are working, you should test it using the QX and IX FB tester as you did in your last photo. Before testing, I would unexport both GPIO in the ssh, to be sure that the file can be opened by 4DIAC. Test both QX and IX with the GPIO number as parameter, QI set to TRUE and first sending an INIT event and then the REQ and changing the VALUE input in QX or reading the VALUE output in IX.
If this doesn't work, maybe there's a problem with your networking. Try disabling the firewall.
5. When it works, you should try the Flip-Flop example with the right parameters in QX and IX. If it doesn't work, at least is a problem of the Flip-Flop application and that would be easier to fix.
Try the steps and see until which one both LED and BUTTON work.]]>Jose Maria Jesus Cabral Lassalle2016-03-29T07:53:41-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1727996/#msg_1727996
]]>Alois Zoitl2016-03-30T07:13:11-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1728071/#msg_1728071
thank you very much for the suggestions.
first of all , I totally disabled the firewall on my computer , as suggested by Jose Cabra.
this post says:
"try first to set the QI = TRUE, PARAM = 3 and then click the INIT event.
If the STATUS = OK then you can set the OUT parameter and click the REQ event."
I follow the instructions and when I press the button init , it changes the status to False Not initializate(you can see it in the picture)
however, if I initialize it without changing anything ( Qi and Out in false , parameter wich gpio port) the status is ok, and then modify Qi to true and Out to true it is still in ok until pulse req , the status change to false and kant net scheiben.
to confirm that the problem is in my system, could anyone pass me a file with the minimum configuration ( e_cicle , e_swicht , Qx, ix) ( Existing system) for making it easier to work
thank
]]>investigacioncp15103 uva2016-03-30T18:15:44-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1728143/#msg_1728143
What the initialization function does is the following (PARAMETER = 2):
1. Opens the "export" file and writes 2 to it
2. Opens the file gpio2/direction
3. Writes "out" to it.
If any of the two first opening or the last write fails, the intiallization fails. So I started debugging it, and the problem didn't appear at all when steping on each line of code of the initialization function. Then, I put a breakpoint to each fail case and ran it without stepping, and the problem appeared again when opening the direction file.
In this case, the problem seems to be because when exporting the GPIO, you don't have permission to write to the files for a short time, and after that you have.
How to solve it:
1. Change the forte code to wait for short time before openning the direction file (not the best fast solution)
2. Run forte with sudo.
I tried the 1. solution, not changing the forte code, but using a bash file to export and open inmediately, and then with sleep in the middle of them and the problem was solved in the bash script (this solution worked only once actually)
The 2. solution (user$ sudo forte) doesn't show the problem at all, and at the first click of the INIT event, the STATUS = OK.
So, try running forte with sudo to see if the problem dissapear, and try INIT twice to see if the second time it works.]]>Jose Maria Jesus Cabral Lassalle2016-03-31T11:07:12-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1728243/#msg_1728243
https://www.youtube.com/watch?v=0PkV7gz4HbE&feature=youtu.be
]]>investigacioncp15103 uva2016-04-01T10:01:04-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1728251/#msg_1728251
You should follow the sequence as the message post you linked before:
"try first to set the QI = TRUE, PARAM = 2 and then click the INIT event.
If the STATUS = OK then you can set the OUT parameter and click the REQ event."
TIP: Keep QI always TRUE, both for INIT and REQ.]]>Jose Maria Jesus Cabral Lassalle2016-04-01T10:11:12-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1728255/#msg_1728255
I think you liked the video , I sent another link with the method you told me you which does not work
https://www.youtube.com/watch?v=nAm7iYPQhjU&feature=youtu.be]]>investigacioncp15103 uva2016-04-01T11:09:08-00:00Re: Problem with QX in Raspberry pi
https://www.eclipse.org/forums/index.php/mv/msg/1075982/1728262/#msg_1728262
What I would recommend is:
First, I try to let the GPIO2 in a default state:
If no error ocurred, and before debuging, you could put the GPIO again in a default state, and then run the FBtester again, and then check what happened with the GPIO in the Pi.
If the /sys/class/gpio/gpio2 folder didn't appear, it means that opening the export file failed.
If it is there the folder, but /sys/class/gpio/gpio2/direction is "in", then opening or writing to /sys/class/gpio/gpio2/direction failed. (At least in my PI, when exporting, the direciton is the same as the last time)
]]>Jose Maria Jesus Cabral Lassalle2016-04-01T12:51:37-00:00