+1 vote
217 views
in Communication protocols by Niall McCullough (13 points)

I am testing the SPI slave component on my HIL404 system. I have connected the master SPI to the GPIO connector on pins1-4 as described in the manual (https://www.typhoon-hil.com/documentation/typhoon-hil-software-manual/References/spi_protocol.html). In the HIL SCADA, I can visualise the HIL GPIO pins and can see the SCLK, MOSI and CS pin toggling as expected. However the SPI slave is never transmitting a response on the SPI MISO pin.

By toggling the SPI reset pin on the SPI slave component, I can see the MISO pin going to high impedance. So the component does seem to be running. The SPI status pin remains at '0', so there is no error detected by the component. 

  • Is there somthing additional apart from the message structure and registers that needs to be defined to get a SPI response?
  • Is there a way to test the logic in the message structure to see what the component is actually receiving as message?
  • Is there something in the Mask editor that needs to be edited? 

1 Answer

+1 vote
ago by Era Bajpai (321 points)

Hi Niall,
In case you issue is not resolved yet, you can try running the attached model using your master input. Check the GPIOs in capture/scope to confirm if the MISO is generating data. You can try the same configuration as I have used below.
Recently, the SPI component has been upgraded with more advanced parametrization, so I recommend you to use this model for Typhoon HIL Control Center Version 2025.3.
Typhoon has also added a new example model for SPI Default_return which can also be used to understand the configuration of the block.
 

Schematic file

ago by Bojana Vasic (10 points)
+2
Hi Niall,

Version 2025.1 has an issue with bit-level command and address read/write operations. This issue is resolved in version 2025.3.
Welcome to the Typhoon HIL user forum. Please check self-service support resources before posting a question.

HIL Specialist 2.0 courses
Documentation
Knowledgebase (Legacy)
Video support on demand
Youtube tutorials

For subscription-based support visit Typhoon HIL Support Center
...