Fix parameter passing to port
Add more debug info to spi