Mesa 7i92 bit file help
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
All GPIO pins default to input mode at startup and must be set to output mode in the hal file,
you set a GPIO to output mode by setting its is_output parameter like:
setp hm2_7i92.0.gpio.025.is_output true
Also unless you disable the additional stepgens/encoders/pwmgens on P1 as indicated above
you will not have full GPIO access as some pins will be "owned" by stepgens, pwmgens, or encoders.
Here's what I get on LinuxCNC startup with only P2s stepgens etc enabled:
Note that all of P1's I/O are just GPIO (IOPort)
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
Also unless you disable the additional stepgens/encoders/pwmgens on P1 as indicated above
you will not have full GPIO access as some pins will be "owned" by stepgens, pwmgens, or encoders.
Did this not disable the stepgens etc [ num_encoders=1 num_stepgens=5 and num_pwmgens=1 ]
as that is what I thought you meant.
Many thanks for the continued help with this. I am learning all the time
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
A better way to check this is to list the pins/parameters with halcmd:
halcmd show all | grep 7i92 > all7i92stuff.txt
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
It should as long as you have it in the right place in the hal or ini file but your pin listing did not show this
A better way to check this is to list the pins/parameters with halcmd:
halcmd show all | grep 7i92 > all7i92stuff.txt
Yes this look better (attached)
Regarding this :- Attached . On P1 I017 - 30 - 31 - 32 - 33 - 20 - 22 I measure 5 v to ground.
Should I not see 5v on the other 10 pins on P1?
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
I would expect to see 5V on all P1 pins, but your list shows that you have not disabled the special functions on P1 (so the "num_stepgens = 5 num_pwmgens=1 num_encoders=1" token is not being used)
The "num_stepgens = 5 num_pwmgens=1 num_encoders=1" is in the ini file and in the PP log it shows that it has used that string.
i am using the 7i92_C11Gx2D.bit file
Can the other pins that don't have 5v on them still be used in any way?
Thanks for the info
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
halcmd show param hm2_7i92*
show
If the P1 pins are low when unconnected this means that the config string was _not_ used
Also if the is_output parameter is not present for all of P1's pins (GPIO016 through GPIO 033) this also means the the config tokens were not used
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
what does:
halcmd show param hm2_7i92*
show
If the P1 pins are low when unconnected this means that the config string was _not_ used
Also if the is_output parameter is not present for all of P1's pins (GPIO016 through GPIO 033) this also means the the config tokens were not used
Very strange . In this state does that mean they can't be used?
Attached
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17999
- Thank you received: 4843
(you can see this in your parameter list, most of the is_output_ attributes are missing on P1 pins)
This points to a hal/ini file problem with the driver config line
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
- Posts: 2244
- Thank you received: 478
Ok I have attached the -- hal -- ini -- PP log file -- show param -- show pinNo, they cannot be used because all the secondary functions on P1 are still enabled
(you can see this in your parameter list, most of the is_output_ attributes are missing on P1 pins)
This points to a hal/ini file problem with the driver config line
If you get the time would you mind looking over them to see where I am going wrong.
Please Log in or Create an account to join the conversation.