English
Language : 

UM1573 Datasheet, PDF (8/27 Pages) STMicroelectronics – ST7540 power line modem firmware stack
ST7540 stack firmware code
UM1573
Figure 5. Firmware stack block diagram
PENDING
ID
Node-x
CHECK
Frame ID
NOT
PENDING ID
ACK
SENSED
Node-x
REPEAT
bACK
Node-x
bACK
CHECK
SENT
pending
Frame ID
PENDING ID
NOT
PENDING ID
TOUT
ELAPSED
Node-x
START
bACK timeout
counter
bACK
SENSED
Node-x
REPEAT
ACK
bACK
SENSED
ACK
SENT
FRAME
SENSED
Node-x
IDLE
Node-Y
ADDRESS
Node-x
SEND
bACK
REQUEST TO
SEND FRAME
FRAME
SENT
Node-X
ADDRESS
Node-x
CHECK
Address
ACK
SENSED
TOUT NOT
ELAPSED
Node-x
SEND
Frame
bACK
SENSED
FRAME
SENT
Node-x
DELIVERY
ERROR
NOT
PENDING ID
Node-x
CHECK
Frame ID
Node-x
START
Global timeout
counter
TOUT
ELAPSED
Node-x
REPEAT
Frame
PENDING ID
BAND IN
USE
TOUT NOT
ELAPSED
Node-x
STORE
ACK & ACK ID
Node-x
CHECK
Frame
ADDRESS
Node-X
ADDRESS
Node-Y
ADDRESS
ACK
SENT
Node-x
SEND
ACK
TOUT ELAPSED
(BAND FREE)
ID ALREADY
PROCESSED
bACK
SENSED
Node-x
CHECK
Frame ID
NEW ID
Node-x
STORE
Frame &
Frame ID
BAND FREE
TOUT NOT
ELAPSED
Node-x
START
ACK timeout
counter
ACK
SENSED
Node-x
CHECK
BAND
TOUT
ELAPSED
AM15247v1
The current firmware implementation is unique for any kind of device; master, slave, or
repeater. The PLM stack is able to understand when the master, slave, or repeater state
machine must be executed, depending on the data context. Figure 5 shows the block
diagram of the implemented firmware stack.
2.1
ST7540 driver layer
The lower firmware layer (or level) is the physical layer which contains the ST7540 driver,
and is made up of all the routines used for the transceiver configuration, initialization and
management, and all the necessary STM32F103xx peripherals for configuration and setup.
For the physical ST7540 interface management (SPI and GPIOs connected to the
transceiver), the STM32F103xx standard library is used. Please refer to the library user
manual for more details.
In order to initialize the ST7540 hardware, the following API must be used:
void PLM_PeripheralInit(PLM_IntPriorityInitTypeDef *PLM_PeripInitStruct);
In PLM_IntPriorityInitTypeDef the interrupt priorities for both the SPI peripheral and
the external interrupt used for the carriage detect pin (CDPD) can be defined.
8/27
Doc ID 023619 Rev 1