podlaczone i test

This commit is contained in:
2026-07-10 11:59:03 +02:00
parent 53846c68a0
commit 83fc751305
2 changed files with 154 additions and 0 deletions

126
mesa.log Normal file
View File

@@ -0,0 +1,126 @@
nc@mayo-mill:~$ mesaflash --readhmid --device 7i92t
Configuration Name: HOSTMOT2
General configuration information:
BoardName : MESA7I92
FPGA Size: 20 KGates
FPGA Pins: 256
Number of IO Ports: 2
Width of one I/O port: 17
Clock Low frequency: 100.0000 MHz
Clock High frequency: 180.0000 MHz
IDROM Type: 3
Instance Stride 0: 4
Instance Stride 1: 64
Register Stride 0: 256
Register Stride 1: 256
Modules in configuration:
Module: DPLL
There are 1 of DPLL in configuration
Version: 0
Registers: 7
BaseAddress: 7000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: WatchDog
There are 1 of WatchDog in configuration
Version: 0
Registers: 3
BaseAddress: 0C00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: IOPort
There are 2 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: QCount
There are 2 of QCount in configuration
Version: 2
Registers: 5
BaseAddress: 3000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: StepGen
There are 10 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: PWM
There are 2 of PWM in configuration
Version: 0
Registers: 5
BaseAddress: 4100
ClockFrequency: 180.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: LED
There are 1 of LED in configuration
Version: 0
Registers: 1
BaseAddress: 0200
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Configuration pin-out:
IO Connections for P2
DB25 pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
1 0 IOPort None
14 1 IOPort PWM 0 PWM (Out)
2 2 IOPort StepGen 0 Step/Table1 (Out)
15 3 IOPort None
3 4 IOPort StepGen 0 Dir/Table2 (Out)
16 5 IOPort StepGen 4 Step/Table1 (Out)
4 6 IOPort StepGen 1 Step/Table1 (Out)
17 7 IOPort None
5 8 IOPort StepGen 1 Dir/Table2 (Out)
6 9 IOPort StepGen 2 Step/Table1 (Out)
7 10 IOPort StepGen 2 Dir/Table2 (Out)
8 11 IOPort StepGen 3 Step/Table1 (Out)
9 12 IOPort StepGen 3 Dir/Table2 (Out)
10 13 IOPort QCount 0 Quad-A (In)
11 14 IOPort QCount 0 Quad-B (In)
12 15 IOPort QCount 0 Quad-IDX (In)
13 16 IOPort None
IO Connections for P1
DB25 pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
1 17 IOPort None
14 18 IOPort PWM 1 PWM (Out)
2 19 IOPort StepGen 5 Step/Table1 (Out)
15 20 IOPort None
3 21 IOPort StepGen 5 Dir/Table2 (Out)
16 22 IOPort StepGen 9 Step/Table1 (Out)
4 23 IOPort StepGen 6 Step/Table1 (Out)
17 24 IOPort None
5 25 IOPort StepGen 6 Dir/Table2 (Out)
6 26 IOPort StepGen 7 Step/Table1 (Out)
7 27 IOPort StepGen 7 Dir/Table2 (Out)
8 28 IOPort StepGen 8 Step/Table1 (Out)
9 29 IOPort StepGen 8 Dir/Table2 (Out)
10 30 IOPort QCount 1 Quad-A (In)
11 31 IOPort QCount 1 Quad-B (In)
12 32 IOPort QCount 1 Quad-IDX (In)
13 33 IOPort None

28
test_inputs.hal Normal file
View File

@@ -0,0 +1,28 @@
# Testowy plik HAL do weryfikacji wejsc karty Mesa 7i92T/TF
# Uruchomienie: halrun -i -f test_inputs.hal
# 1. Utworzenie watku czasu rzeczywistego (servo-thread, 1ms)
loadrt threads name1=servo-thread period1=1000000
# 2. Zaladowanie sterownika Mesa z wylaczonymi enkoderami (num_encoders=0)
# Dzieki temu piny 10, 11, 12 beda dzialac jako zwykle GPIO
loadrt hostmot2
loadrt hm2_eth board_ip="192.168.1.121" config="num_encoders=0 num_stepgens=0"
# 3. Przypisanie funkcji odczytu i zapisu karty do watku
addf hm2_7i92.0.read servo-thread
addf hm2_7i92.0.write servo-thread
# 4. Utworzenie sygnalow testowych dla pieciu wejsc portu DB25 (P2)
net test-pin10 <= hm2_7i92.0.gpio.013.in
net test-pin11 <= hm2_7i92.0.gpio.014.in
net test-pin12 <= hm2_7i92.0.gpio.015.in
net test-pin13 <= hm2_7i92.0.gpio.016.in
net test-pin15 <= hm2_7i92.0.gpio.003.in
# 5. Uruchomienie watku
start
# Po uruchomieniu mozesz w konsoli halrun wpisac np.:
# show pin hm2_7i92.0.gpio
# watch pin hm2_7i92.0.gpio.013.in