Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN4274 Datasheet(PDF) 7 Page - STMicroelectronics

Part # AN4274
Description  The serial communication driver between
PDF  13 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4274 Datasheet(HTML) 7 Page - STMicroelectronics

Back Button AN4274 Datasheet HTML 3Page - STMicroelectronics AN4274 Datasheet HTML 4Page - STMicroelectronics AN4274 Datasheet HTML 5Page - STMicroelectronics AN4274 Datasheet HTML 6Page - STMicroelectronics AN4274 Datasheet HTML 7Page - STMicroelectronics AN4274 Datasheet HTML 8Page - STMicroelectronics AN4274 Datasheet HTML 9Page - STMicroelectronics AN4274 Datasheet HTML 10Page - STMicroelectronics AN4274 Datasheet HTML 11Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 13 page
background image
DocID024358 Rev 1
7/13
AN4274
Serial communication layer
4
Serial communication layer
The serial communication module defines all the functions to manage the serial data flow.
The core of the serial communication driver is a "ModemComFSM" function. This is a finite
state machine and must be called in an infinite loop, as follows:
while(1)
{
state = ModemComFSM( &SerCom, DL_Act);
switch (state)
{...}
}
This function has the following input parameters:
•
SerCom
, input/output parameter. It is a pointer to "SER_CMD_FRAME_T" struct:
typedef struct{
u8 id;
//host interface command code
u8 Rxpar_len;
//reception buffer length
u8 Txpar_len
; //transmission buffer length
u8 Rxparam[255];
//reception buffer
u8 Txparam[255];
//transmission buffer
} SER_CMD_FRAME_T
;
•
DL_Act
, this parameter notifies that the data is ready to be sent; the user sets "1" to
send the data.
Table 1 defines the return values of the finite state machine:
Table 1. FSM return values
Name
Value
FSM state
Description
M_FRAME_ACKED
04h
1
Frame sent to PLM and ACK arrived.
M_FRAME_NOT_ACKED
05h
1
Frame sent to PLM and NACK arrived
(error state).
M_WAIT_ACK
06h
1
FSM waits for either ACK or NACK
after sending data.
M_FRAME_RECEIVED
07h
2
FSM received the data from a PLM,
and the data is ready to be read.
M_IDLE
08h
2
The FSM is ready to receive the data
from STM32Fx to be sent to PLM.
M_FRAME_VALID
09h
2
The data received by STM32Fx is valid.
M_FRAME_NOT_VALID
0Ah
2
The data received by STM32Fx is not
valid (error state).
M_FRAME_DELIVERED
0Bh
3
The FSM delivered the data to PLM.
M_WAIT_STATUS
0Ch
3
The FSM waits for the status of the
message from PLM.
M_FRAME_CONFIRMED
0Dh
4
The data sent to PLM is confirmed.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com