Microsemi / switchtec-kernel

A kernel module for the Microsemi PCIe switch
GNU General Public License v2.0
45 stars 31 forks source link

gas write/read over serial/mmapped interface not working as expected with PAX 42100 #103

Closed maquefel closed 3 years ago

maquefel commented 3 years ago

Hello, i am experiencing strange behavior trying to read temperature over serial/mmapped interface:

Results in zero read with no visible error:

./switchtec gas write /dev/switchtec0 -a 0x0 -v 0x2 -y
./switchtec gas write /dev/switchtec0 -a 0x800 -v 0x04 -y
./switchtec gas read /dev/switchtec0 -a 0x400
000400 - 0x00000000
./switchtec gas write /dev/ttyUSB0 -a 0x0 -v 0x2 -y
./switchtec gas write /dev/ttyUSB0 -a 0x800 -v 0x04 -y
./switchtec gas read /dev/ttyUSB0 -a 0x400
000400 - 0x00000000

Same sequence over terminal by hand gives expected result:

0x00000000:004f>gaswr 0x0 0x2
gas_reg_write() success
0x00000000:0050>gaswr 0x800 0x04
gas_reg_write() success
0x00000000:0051>gasrd 0x400
gas_reg_read <0x400> [1]
0x000011bd
0x00000000:0052>

tested on v2.6-rc1

maquefel commented 3 years ago

Wrong project to post - sorry. Should be switchtec-user.