Mesa 7i76eu output_sink and output_source confusion
- garmanarnar
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
11 Mar 2026 13:10 #344135
by garmanarnar
Mesa 7i76eu output_sink and output_source confusion was created by garmanarnar
Hello all, I am trying to configure `output_sink` and `output_source` pins for my Mesa 7i76eu and I am running into some surprising behavior. My goal is to put `hm2_7i76e.0.7i76.0.0.output-11` into sink mode.
Long story short, putting `setp hm2_7i76e.0.7i76.0.0.output_source 0x0000F7FF` and `setp hm2_7i76e.0.7i76.0.0.output_sink 0x00000800` in my HAL file after loading `hm2_eth` does not seem to have any effect, output-11 remains in sourcing mode. I spent some time debugging this and found some surprising results.
The first thing I did was attempt to setup the pins manually without changing anything in my HAL file. For this test, my HAL file did not set `output_sink` or `output_source` at all. On a fresh power cycle of both my computer and the mesa card, the following works correctly (causes output-11 to sink when TRUE).
```
halcmd setp hm2_7i76e.0.7i76.0.0.output_source 0x0000F7FF
halcmd setp hm2_7i76e.0.7i76.0.0.output_sink 0x00000800
halcmd setp hm2_7i76e.0.7i76.0.0.output-11 TRUE
```
I can toggle output-11 back and forth between TRUE and FALSE and it appears to work just fine. The strange part is that if I set output_source = 0x0000FFFF output_sink = 0x00000000 (going back to the default value), `output-11` remains in sinking mode, it does not switch back to sourcing mode. The only way I can get it to switch back is if I power cycle the Mesa card.
The second thing I tried was setting `hm2_7i76e.0.7i76.0.0.output_source 0x0000F7FF` and `setp hm2_7i76e.0.7i76.0.0.output_sink 0x00000800` as part of my postgui HAL, the thinking being that maybe there is some timing issue for when you configure the output pin modes. This does seem to work as long as I do a power cycle of the Mesa card and computer, but it feels like a bit of a hack.
I'm using this setup to control activation of a wireless probe receiver which needs `output-11` to sink to ground in order to activate the probe, so my main worry is that I'm just hiding a timing related issue by doing this in postgui and will end up running into a crash down the line. If anyone has some insight into how `output_source` and `output_sink` are supposed to work, that would be appreciated!
Thanks!
Long story short, putting `setp hm2_7i76e.0.7i76.0.0.output_source 0x0000F7FF` and `setp hm2_7i76e.0.7i76.0.0.output_sink 0x00000800` in my HAL file after loading `hm2_eth` does not seem to have any effect, output-11 remains in sourcing mode. I spent some time debugging this and found some surprising results.
The first thing I did was attempt to setup the pins manually without changing anything in my HAL file. For this test, my HAL file did not set `output_sink` or `output_source` at all. On a fresh power cycle of both my computer and the mesa card, the following works correctly (causes output-11 to sink when TRUE).
```
halcmd setp hm2_7i76e.0.7i76.0.0.output_source 0x0000F7FF
halcmd setp hm2_7i76e.0.7i76.0.0.output_sink 0x00000800
halcmd setp hm2_7i76e.0.7i76.0.0.output-11 TRUE
```
I can toggle output-11 back and forth between TRUE and FALSE and it appears to work just fine. The strange part is that if I set output_source = 0x0000FFFF output_sink = 0x00000000 (going back to the default value), `output-11` remains in sinking mode, it does not switch back to sourcing mode. The only way I can get it to switch back is if I power cycle the Mesa card.
The second thing I tried was setting `hm2_7i76e.0.7i76.0.0.output_source 0x0000F7FF` and `setp hm2_7i76e.0.7i76.0.0.output_sink 0x00000800` as part of my postgui HAL, the thinking being that maybe there is some timing issue for when you configure the output pin modes. This does seem to work as long as I do a power cycle of the Mesa card and computer, but it feels like a bit of a hack.
I'm using this setup to control activation of a wireless probe receiver which needs `output-11` to sink to ground in order to activate the probe, so my main worry is that I'm just hiding a timing related issue by doing this in postgui and will end up running into a crash down the line. If anyone has some insight into how `output_source` and `output_sink` are supposed to work, that would be appreciated!
Thanks!
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.103 seconds