I just realized I screwed up the previous patch. I forgot to include the
change to set NumInstances to 2.
I found another issue I am had with the hostmot2 driver while using the
7i65 board with the way it determines how many encoder select pins to
allocate. In pins.c the encoder select pins are determined by how many
encoders there are,
// muxed encoder gets the sel pins
hm2_pins_allocate_all(hm2, HM2_GTAG_MUXED_ENCODER_SEL,
hm2->encoder.num_instances);
With this code if I set num_encoders to 8 emc for the 7I65 card it will
allocate the select pins from both connectors if using a 2x7i65
firmware. Here is the output from dmesg with num_encoders set to 8.
[12868.246262] hm2/hm2_7i43.0: created Buffered SPI function
hm2_7i43.0.bspi.0.
[12868.251260] hm2/hm2_7i43.0: 48 I/O Pins used:
[12868.251270] hm2/hm2_7i43.0: IO Pin 000 (P4-01): Muxed Encoder #0,
pin Muxed A (Input)
[12868.251278] hm2/hm2_7i43.0: IO Pin 001 (P4-03): Muxed Encoder #0,
pin Muxed B (Input)
[12868.251286] hm2/hm2_7i43.0: IO Pin 002 (P4-05): Muxed Encoder #0,
pin Muxed Index (Input)
[12868.251294] hm2/hm2_7i43.0: IO Pin 003 (P4-07): Muxed Encoder #1,
pin Muxed A (Input)
[12868.251302] hm2/hm2_7i43.0: IO Pin 004 (P4-09): Muxed Encoder #1,
pin Muxed B (Input)
[12868.251309] hm2/hm2_7i43.0: IO Pin 005 (P4-11): Muxed Encoder #1,
pin Muxed Index (Input)
[12868.251317] hm2/hm2_7i43.0: IO Pin 006 (P4-13): Muxed Encoder #2,
pin Muxed A (Input)
[12868.251325] hm2/hm2_7i43.0: IO Pin 007 (P4-15): Muxed Encoder #2,
pin Muxed B (Input)
[12868.251333] hm2/hm2_7i43.0: IO Pin 008 (P4-17): Muxed Encoder #2,
pin Muxed Index (Input)
[12868.251341] hm2/hm2_7i43.0: IO Pin 009 (P4-19): Muxed Encoder #3,
pin Muxed A (Input)
[12868.251349] hm2/hm2_7i43.0: IO Pin 010 (P4-21): Muxed Encoder #3,
pin Muxed B (Input)
[12868.251357] hm2/hm2_7i43.0: IO Pin 011 (P4-23): Muxed Encoder #3,
pin Muxed Index (Input)
[12868.251365] hm2/hm2_7i43.0: IO Pin 012 (P4-25): Muxed Encoder
Select #0, pin Mux Select 1 (Output)
[12868.251374] hm2/hm2_7i43.0: IO Pin 013 (P4-27): Muxed Encoder
Select #0, pin Mux Select 0 (Output)
[12868.251383] hm2/hm2_7i43.0: IO Pin 014 (P4-29): Buffered SPI
Interface #0, pin /Frame (Output)
[12868.251391] hm2/hm2_7i43.0: IO Pin 015 (P4-31): Buffered SPI
Interface #0, pin Serial Out (Output)
[12868.251399] hm2/hm2_7i43.0: IO Pin 016 (P4-33): Buffered SPI
Interface #0, pin Clock (Output)
[12868.251408] hm2/hm2_7i43.0: IO Pin 017 (P4-35): Buffered SPI
Interface #0, pin Serial In (Input)
[12868.251416] hm2/hm2_7i43.0: IO Pin 018 (P4-37): Buffered SPI
Interface #0, pin CS2 (Output)
[12868.251424] hm2/hm2_7i43.0: IO Pin 019 (P4-39): Buffered SPI
Interface #0, pin CS1 (Output)
[12868.251432] hm2/hm2_7i43.0: IO Pin 020 (P4-41): Buffered SPI
Interface #0, pin CS0 (Output)
[12868.251439] hm2/hm2_7i43.0: IO Pin 021 (P4-43): IOPort
[12868.251446] hm2/hm2_7i43.0: IO Pin 022 (P4-45): IOPort
[12868.251452] hm2/hm2_7i43.0: IO Pin 023 (P4-47): IOPort
[12868.251458] hm2/hm2_7i43.0: IO Pin 024 (P3-01): IOPort
[12868.251464] hm2/hm2_7i43.0: IO Pin 025 (P3-03): IOPort
[12868.251470] hm2/hm2_7i43.0: IO Pin 026 (P3-05): IOPort
[12868.251476] hm2/hm2_7i43.0: IO Pin 027 (P3-07): IOPort
[12868.251482] hm2/hm2_7i43.0: IO Pin 028 (P3-09): IOPort
[12868.251488] hm2/hm2_7i43.0: IO Pin 029 (P3-11): IOPort
[12868.251494] hm2/hm2_7i43.0: IO Pin 030 (P3-13): IOPort
[12868.251500] hm2/hm2_7i43.0: IO Pin 031 (P3-15): IOPort
[12868.251507] hm2/hm2_7i43.0: IO Pin 032 (P3-17): IOPort
[12868.251513] hm2/hm2_7i43.0: IO Pin 033 (P3-19): IOPort
[12868.251519] hm2/hm2_7i43.0: IO Pin 034 (P3-21): IOPort
[12868.251525] hm2/hm2_7i43.0: IO Pin 035 (P3-23): IOPort
[12868.251532] hm2/hm2_7i43.0: IO Pin 036 (P3-25): Muxed Encoder
Select #1, pin Mux Select 1 (Output)
[12868.251541] hm2/hm2_7i43.0: IO Pin 037 (P3-27): Muxed Encoder
Select #1, pin Mux Select 0 (Output)
[12868.251548] hm2/hm2_7i43.0: IO Pin 038 (P3-29): IOPort
[12868.251554] hm2/hm2_7i43.0: IO Pin 039 (P3-31): IOPort
[12868.251560] hm2/hm2_7i43.0: IO Pin 040 (P3-33): IOPort
[12868.251566] hm2/hm2_7i43.0: IO Pin 041 (P3-35): IOPort
[12868.251573] hm2/hm2_7i43.0: IO Pin 042 (P3-37): IOPort
[12868.251579] hm2/hm2_7i43.0: IO Pin 043 (P3-39): IOPort
[12868.251585] hm2/hm2_7i43.0: IO Pin 044 (P3-41): IOPort
[12868.251591] hm2/hm2_7i43.0: IO Pin 045 (P3-43): IOPort
[12868.251597] hm2/hm2_7i43.0: IO Pin 046 (P3-45): IOPort
[12868.251603] hm2/hm2_7i43.0: IO Pin 047 (P3-47): IOPort
I'm still trying to wrap my head around hostmot's vhdl and emc's code
and am not sure how to fix it ( or did I screw something up? ).
On 11-08-11 06:04 AM, Cliff Blackburn wrote:
I found an issue with the PIN_2X7I65_72 bit file in the Hostmot2 git
repository with the encoder mux pins not being assigned correctly. I
have attached a patch which should fix it.
>From ba4b53746f07561cb805337c0a237363b858b431 Mon Sep 17 00:00:00 2001
From: Cliff Blackburn <cblackb...@powertechrepairs.com>
Date: Thu, 11 Aug 2011 00:07:40 -0700
Subject: [PATCH] Fix encoder Mux pins for 7i65
---
PIN_2X7I65_72.vhd | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/PIN_2X7I65_72.vhd b/PIN_2X7I65_72.vhd
index 8b9d801..dfb7b83 100644
--- a/PIN_2X7I65_72.vhd
+++ b/PIN_2X7I65_72.vhd
@@ -74,7 +74,7 @@ package PIN_2X7I65_72 is
(WatchDogTag, x"00", ClockLowTag, x"01", WatchDogTimeAddr&PadT, WatchDogNumRegs, x"00", WatchDogMPBitMask),
(IOPortTag, x"00", ClockLowTag, x"03", PortAddr&PadT, IOPortNumRegs, x"00", IOPortMPBitMask),
(MuxedQcountTag, x"02", ClockLowTag, x"10", MuxedQcounterAddr&PadT, MuxedQCounterNumRegs, x"00", MuxedQCounterMPBitMask),
- (MuxedQCountSelTag, x"00", ClockLowTag, x"01", NullAddr&PadT, x"00", x"00", x"00000000"),
+ (MuxedQCountSelTag, x"00", ClockLowTag, x"02", NullAddr&PadT, x"00", x"00", x"00000000"),
(BSPITag, x"00", ClockLowTag, x"02", BSPIDataAddr&PadT, BSPINumRegs, x"11", BSPIMPBitMask),
(LEDTag, x"00", ClockLowTag, x"01", LEDAddr&PadT, LEDNumRegs, x"00", LEDMPBitMask),
(NullTag, x"00", NullTag, x"00", NullAddr&PadT, x"00", x"00", x"00000000"),
@@ -119,8 +119,8 @@ package PIN_2X7I65_72 is
IOPortTag & x"03" & MuxedQCountTag & MuxedQCountQAPin, -- I/O 09
IOPortTag & x"03" & MuxedQCountTag & MuxedQCountQBPin, -- I/O 10
IOPortTag & x"03" & MuxedQCountTag & MuxedQCountIDXPin, -- I/O 11
- IOPortTag & x"00" & NullTag & x"00", -- I/O 12
- IOPortTag & x"00" & MuxedQCountSelTag & MuxedQCountSel0Pin, -- I/O 37
+ IOPortTag & x"00" & MuxedQCountSelTag & MuxedQCountSel1Pin, -- I/O 12
+ IOPortTag & x"00" & MuxedQCountSelTag & MuxedQCountSel0Pin, -- I/O 13
IOPortTag & x"00" & BSPITag & BSPIFramePin, -- I/O 14
IOPortTag & x"00" & BSPITag & BSPIOutPin, -- I/O 15
IOPortTag & x"00" & BSPITag & BSPIClkPin, -- I/O 16
@@ -145,8 +145,8 @@ package PIN_2X7I65_72 is
IOPortTag & x"07" & MuxedQCountTag & MuxedQCountQAPin, -- I/O 33
IOPortTag & x"07" & MuxedQCountTag & MuxedQCountQBPin, -- I/O 34
IOPortTag & x"07" & MuxedQCountTag & MuxedQCountIDXPin, -- I/O 35
- IOPortTag & x"00" & NullTag & x"00", -- I/O 36
- IOPortTag & x"00" & MuxedQCountSelTag & MuxedQCountSel0Pin, -- I/O 37
+ IOPortTag & x"01" & MuxedQCountSelTag & MuxedQCountSel1Pin, -- I/O 36
+ IOPortTag & x"01" & MuxedQCountSelTag & MuxedQCountSel0Pin, -- I/O 37
IOPortTag & x"01" & BSPITag & BSPIFramePin, -- I/O 38
IOPortTag & x"01" & BSPITag & BSPIOutPin, -- I/O 39
IOPortTag & x"01" & BSPITag & BSPIClkPin, -- I/O 40
--
1.7.4
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers