ST METERS AND MORE UM2241 User Manual Download Page 7

UM2241 

Host interface

 

 

 

DocID030767 Rev 1 

7/26 

 

Section 1.7: "Examples"

 contains some examples on how complex operations shall be 

managed between the host controller and the ST75MM. 

1.3 

Acknowledge 

In order to improve the serial link robustness, every frame except the SM must be 
acknowledged by the receiver within a given period T

ACK

 (host interface timings are 

managed through a dedicated MIB object, see 

Section 3.1: "MIB objects"

 for reference), 

otherwise the sender will repeat once the same message waiting for a new acknowledge. If 
no acknowledge arrives after the second message is sent, the message is discarded by the 
sender and no further repetitions are sent. If the sender is the ST75MM, no further action is 
taken. 

The acknowledge byte is only linked to the format of the frame, and shall never give 
feedback on the validity or execution of the command; it can have two values: 

 

0x06 (ACK) which means that the received command is well formed 

 

0x15 (NAK) which means that the received command has errors (length or CRC). 

1.4 

Command frame format 

Commands are formatted as follows: 

Table 1: Command frame format 

Starting 

Byte 

Field 

Size 

Value 

Description 

Frame 

start 

0x02 / 

0x03 

Used to mark the start of a command. In order for the 
host controller to distinguish between a message and its 
repetition

(1)

. The frame start has always the value 0x02, 

except for repeated messages, where a value of 0x03 is 
used. When the host controller receives a message 
starting with 0x03 it should verify if the same message 
has already been received, and, in this case, discards 
the latter one. 

Length 

Any 

Number of payload bytes after the first one (always 
sent). 

Command 

code 

Any 

Identifies the command to be executed. 

Payload 

1...256 

Any 

Contains the parameters associated with the command. 

 

Checksum 

Any 

Sum of the Length, Command code and Payload fields. 
The sum is performed byte-wise, represented as 16-bit 
value and sent to the host controller MSB first. 

 

Notes: 

(1)

This condition is generated when the modem doesn’t receive the ACK message from the host controller within 

the proper T

ACK

 time.

 

 

1.5 

Status message frame format (SM) 

The SM is formatted as follows: 

Table 2: Status message format 

Starting 

Byte 

Field 

Size  Value 

Description 

Summary of Contents for METERS AND MORE UM2241

Page 1: ...al which targets application developers provides complete information on how to use the ST75MM in applications by describing the host interface the available protocol services and the MIB accessible through the host interface For ordering information mechanical and electrical device characteristics please refer to the ST75MM datasheet available at www st com ...

Page 2: ...m 15 2 3 3 MIB_Write negative confirm 15 2 3 4 MIB_Write indication 15 2 4 MIB_Read 15 2 4 1 MIB_Read request 16 2 4 2 MIB_Read positive confirm 16 2 4 3 MIB_Read negative confirm 16 2 5 BIO_Reset 16 2 5 1 BIO_Reset request 16 2 5 2 BIO_Reset positive confirm 16 2 5 3 BIO_Reset negative confirm 17 2 5 4 BIO_Reset indication 17 2 6 DL_DATA_SLAVE 17 2 6 1 DL_DATA_SLAVE indication 17 2 7 HI_Ping 18 2...

Page 3: ...cID030767 Rev 1 3 26 4 Configuring the ST75MM 23 4 1 PHY configuration MIB index 2 23 4 2 MAC configuration MIB index 3 24 4 3 Manufacturer data MIB index 6 24 4 4 Custom frequencies MIB index 23 24 5 Revision history 25 ...

Page 4: ...le 9 MAC data MIB object 1 19 Table 10 PHY configuration MIB object 2 19 Table 11 MAC configuration MIB object 3 20 Table 12 Manufacturer data MIB object 6 21 Table 13 Host interface timings MIB object 14 21 Table 14 ZC alarm MIB object 18 21 Table 15 PHY custom frequencies MIB object 23 21 Table 16 PHY statistics MIB object 24 21 Table 17 PHY configuration values for CENELEC 132 5 kHz operations ...

Page 5: ...ntroller to ST75MM connection scheme 6 Figure 2 TREQ negotiation timing diagram 9 Figure 3 DL_DATA_SLAVE indication transaction 10 Figure 4 DL_DATA_SLAVE indication transaction in case of no ack 11 Figure 5 MIB_Write request transaction 12 Figure 6 MIB_Read request transaction 13 ...

Page 6: ...he ST75MM incoming PLC frame completion of requested activities or error warning events this is automatically and immediately sent to the host controller through the serial link This means that the host controller should continuously monitor the UART port decode the frames as they are detected and send an acknowledge message to the ST75MM When the host controller needs to send a command to the ST7...

Page 7: ...RC 1 4 Command frame format Commands are formatted as follows Table 1 Command frame format Starting Byte Field Size Value Description 0 Frame start 1 0x02 0x03 Used to mark the start of a command In order for the host controller to distinguish between a message and its repetition 1 The frame start has always the value 0x02 except for repeated messages where a value of 0x03 is used When the host co...

Page 8: ... 0 1 No overcurrent events registered during the last transmission At least one overcurrent event registered during the last transmission 5 Reserved 6 7 Temperature 00 2 01 10 11 ST75MM temperature is lower than 70 C ST75MM temperature is between 70 C and 100 C ST75MM temperature is between 101 C and 125 C ST75MM temperature is higher than 125 C Notes 1 Before sending any command to the ST75MM the...

Page 9: ...received it verifies that PLC Busy flag is disabled If the PLC Busy flag of the SM is disabled the host controller sends the command to the ST75MM within TSR time and waits for a maximum of TACK time the acknowledge byte from the ST75MM If the acknowledge byte is not received within TACK time the host controller can initiate a new transaction sending the same command with 0x03 as start of the fram...

Page 10: ...ase the acknowledge the same applies in case the indication is lost is lost is the one depicted in the next figure where the second DL_DATA_SLAVE indication message frame uses 0x03 as start of the frame byte instead 0x02 as the first one to let the host controller check if the message has already been received or not ...

Page 11: ...TA_SLAVE indication transaction in case of no ack This is an example of the MIB_Write request coming from the host controller as the initiator is the host controller the session is started with the negotiation with the ST75MM to gain priority on the serial link ...

Page 12: ...Host interface UM2241 12 26 DocID030767 Rev 1 Figure 5 MIB_Write request transaction The MIB_Read request coming from the host controller follows the same mechanism as the MIB_Write ...

Page 13: ...UM2241 Host interface DocID030767 Rev 1 13 26 Figure 6 MIB_Read request transaction ...

Page 14: ... HI_Ping 0x2C 0x2D Host interface loop used to monitor the healthy state of the serial link and modem HI_Error 0x36 Notifies about the reception of an unknown command BIO_Reset 0x3C 0x3D 0x3E 0x3F Triggers a SW reset request or notifies about an internally triggered reset event indication 2 2 Error codes Table 6 List of error codes Value Error Description 0x02 WPL Wrong argument or parameter lengt...

Page 15: ...host controller Command code 0x08 Payload size variable Payload content MIB object index 1 byte MIB content variable 2 3 2 MIB_Write positive confirm Issued by ST75MM Command code 0x09 Payload size 1 byte Payload content MIB object index 1 byte 2 3 3 MIB_Write negative confirm Issued by ST75MM Command code 0x0B Payload size 1 byte Payload content Error code 1 byte 2 3 4 MIB_Write indication Issued...

Page 16: ...code 0x0F Payload size 1 byte Payload content Error code 1 byte 2 5 BIO_Reset These commands are exchanged when the host controller needs to force a SW reset to the ST75MM modem request at the power on after a hardware reset or when the ST75MM modem reaches an instability state and internally triggers a SW reset indication 2 5 1 BIO_Reset request Issued by host controller Command code 0x3C Payload...

Page 17: ...Y error diagnostic Timer or zero crossing diagnostic Inconsistent state diagnostic PHY layer error diagnostic Reserved 7 Reconfiguration status 0 1 One or more reconfigurable MIB objects have not been properly reconfigured after reset All the reconfigurable MIB objects have been correctly reconfigured after reset 2 6 DL_DATA_SLAVE The DL_DATA_SLAVE commands provide data communication as a slave no...

Page 18: ... to restore the ST75MM functionalities 2 7 1 HI_PING request Issued by host controller Command code 0x2C Payload size variable Payload content Test sequence variable The test sequence can be any possible sequence and length between 1 and 256 2 7 2 HI_PING positive confirm Issued by ST75MM Command code 0x2D Payload size variable Payload content Test sequence variable The test sequence is the same r...

Page 19: ...quency setting 24 PHY statistics 9 RW PHY layer statistics Notes 1 Objects not listed here with index in the range 0 34 are reserved objects the host controller should avoid to change their values and disregard any MIB_Write indication related to them 2 R read W write C self reconfigured at startup S affect MIB state in SM I can generate spontaneous MIB_Write indication Table 9 MAC data MIB object...

Page 20: ...e detector enabled 7 CSMA enable 0 CSMA not enabled 1 CSMA enabled 1 0 4 TX gain Gain in dB applied in transmission 5 7 TX modulation Modulation used in transmission 0 to 3 reserved 4 BPSK coded 5 QPSK coded 6 to 7 reserved 2 0 1 PSK preamble 0 16 bits preamble 1 24 bits preamble 2 32 bits preamble 3 40 bits preamble 2 RX low channel Receiving mode for lower channel 0 FSK modulation 1 any PSK modu...

Page 21: ...and values 0 ZC Alarm 0 ZC events on the mains are regular 1 ZC detection on mains failed at least once since the last reset of the attribute Table 15 PHY custom frequencies MIB object 23 Byte Field Bit Sub field Description and values 0 5 TX frequency Set to 0x08 0x7A 0xE1 0x07 0x0A 0x3D for 132 5 kHz 110 kHz frequency pair 6 11 RX frequencies Set to 0x07 0xC2 0x8F 0x09 0x5C 0x29 for 132 5 kHz 11...

Page 22: ...DocID030767 Rev 1 Byte Field Bit Sub field Description and values 8 Discarded frames Counter of frames discarded from the MAC layer due to busy upper layers condition 9 Overcurrent events Number of overcurrent events in the last transmitted frame ...

Page 23: ...ol disabled 1 current control enabled 1 Zero crossing 0 next transmitted frame will start immediately 1 next transmitted frame will start at the next zero crossing event 2 RX channel 0 single channel operations only high channel 1 dual channel operations 3 TX channel 0 transmit on high channel 1 transmit on low channel 4 5 Frequency pair 0 1 2 reserved 3 custom frequency see MIB 23 for channel fre...

Page 24: ... modem address selection are outside the scope of this document anyhow as soon as the manufacturer or the network administrator or any competent authority have assigned those values the host controller shall program it inside the modem by writing the MIB object 6 Until this operation the modem will be capable only of receiving broadcast frames as no default valid address has been programmed into t...

Page 25: ...UM2241 Revision history DocID030767 Rev 1 25 26 5 Revision history Table 19 Document revision history Date Revision Changes 09 Aug 2017 1 Initial release ...

Page 26: ...asers are solely responsible for the choice selection and use of ST products and ST assumes no liability for application assistance or the design of Purchasers products No license express or implied to any intellectual property right is granted by ST herein Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product S...

Reviews: