6.2 wM-Bus Reception

Table 6-3. wM-Bus Reception Examples
SPI Command Sequence Description
Write SRAM/Register (1, 0x04, 0xD0, 0x02)
  • Set wM-bus mode (S1)
  • Start reception of wM-bus protocol
Read SRAM/Register (1, 0x04, 0xD5, status)
  • Read wM-bus status g_wmbusSr.bValue, wait till data is received (g_wmbusSr.Rec)
  • Check that there is no error
Read SRAM/Register (1, 0x04, 0xD1, length) Read length (g_wmbusCr.bLenth) of received data in data buffer
Read SRAM/Register (length, 0x03, 0x28, data0 to dataX) Read out received wM-bus telegram from data buffer g_wmbusDb