Home

C Library for ST7590 and STM32

image

Contents

1. Field Last Snd CMD ID Note Send command ID filled by all CmdMsgSnd xxx Last Rcv CMD ID Received command ID filled by all CmdMsgRcv xxx LastErrCode Always filled by all CmdMsgRcv xxx LastStateField Always filled by all CmdMsgRcv xxx LastResultCode Filled by some CmdMsgRcv xxx commands LastType Filled by CmdMsgRcv MACEstConf LastCfB Filled by CmdMsgRcv MACEstlInd LastReleaseConnectionReason Filled by 59 MACRellnd LastConnectionHandler Filled by some CmdMsgRcv xxx commands LastSNA Filled by CmdMsgRcv MACRegisterlndication LastEUI48 Filled by some CmdMsgRcv xxx commands LastReceivedMessage Filled by some CmdMsgRcv xxx commands LastReceivedMessageLength Filled by some CmdMsgRcv xxx commands TX Buffer Len Used Filled by some CmdMsgRcv xxx commands RX Buffer Len Used Filled by some CmdMsgRcv xxx commands 1 See the ST7590 datasheet and product related documents for the meaning and usage of the remaining fields that are not mentioned in Table 2 Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Commands 5 Commands The user calls only send commands CmdMsgSnd xxx The corresponding receiving command CmdMsgRcv xxx is called automatically according to the CMD ID that is answered by modem ST7590 Communication with PLM 577590 is done by the procedure shown in Table 3
2. C71 UM1076 YA User manual C Library for ST7590 and STM32 M 1 Introduction This document describes the library driver for interfacing STMicroelectronics power line modem demonstration board EVALST7590 with an STM32 microcontroller This helps the developer to test the solution and more quickly design their application The library is designed to be universal and easily adapted to any microcontroller with minor changes The minimum requirements for the microcontroller are a UART and a timer The library was tested and compiled for the STM32 microcontroller in IAR programming environment For example the complete communication node shown in Figure 5 containing the ST7590 demonstration board EVALST7590 1 and a microcontroller connectivity gateway demonstration board STEVAL PCCO12V1 is used An example application which is part of the library can be run on the mentioned communication node directly without any necessary adaptations The example shows communication between the nodes where the service and base node establish a logical connection The service node periodically sends every two seconds a message which is received by the base node Both service node and base node indicate sending or receiving of the packet by toggling of the LED The library implements all the ST7590 commands that this device offers The library was tested on this communication node The use of this library with other platforms and microcontr
3. Table 3 Steps used to communicate with the modem Step User System library 1 Calls CmdMsgSnd xxx Sends xxx command Wait for the first character coming from ST7590 Wait 50 ms Receive complete incoming message Sets ST7590 Status data structure 2 Checks ST7590 Status In Section 5 1to Section 5 5the first five files are described in detail These five files make it possible to build the simplest application cmd msg c checking if the modem is operational e checking if the modem is registered in the network e MAC Establish c logical channel establishment e Daeta c data transfer from Base node to Service node or vice versa e MAC Leave c logical channel break down management The rest of the information about the function and commands in the library can be found in related files the ST7590 datasheet and product related documents and directly in the header files of corresponding commands 5 1 cmd msg h The function of the command and appropriate usage is described in detail in the ST7590 datasheet and product related documents Table 4 Available commands in cmd msg c file Commands Command code Filename PRIME GetState lt 0xBO gt PRIMEConfig lt 0xB3 gt cmd_msg c SW_Reset lt 0x90 gt Send commands void CmdMsgSnd_PrimeGetState void void CmdMsgSnd_PrimeConfig unsigned char Configuration ky Doc ID 018752 Rev 1 9 26 www BDTIC com ST Commands UM1076 5 2 5 3 10 26 void CmdMsgSnd_SW
4. BASE SWITCH NODE DEZ 5 HDR DO 0 E CON N 0 CON LC D K CON REQ p HDR DO 1 CON N 0 CONLCID N REQ BASE SWITCH NODE CON HDR DO 1 CO CON N 0 CON LCID K N REQ p Con E HDR DO 0 1 9 CON LC D K 07510 7 3 main c This file contains only the state machine that calls the corresponding function of each state from function c file ActualStateEnum ActualState MODEM CHECK while 1 switch ActualState case MODEM CHECK ActualState modem_state_check break case CLIENT MASTER DATA SEND ActualState client master data send req break ky Doc ID 018752 Rev 1 19 26 www BDTIC com ST Communication example UM1076 7 4 20 26 case CLIENT MASTER DATA CONFIRM ind ActualState client master data confirm ind break case CLIENT MASTER DATA RECEIVE ind ActualState client master data receive ind break case SERVER SLAVE DATA SEND ActualState server slave data send req break case SERVER SLAVE DATA RECEIVE ind ActualState server slave data receive ind break case IDLE STATE break ActualState check external events ActualState check for incoming packet functions c This file contains the corresponding functions for each state of the state machine implemented in main c ActualStateEnum modem state check void while GetFPMAstatus NO EFFECT HARD WIRED UAR
5. Figure 5 shows an application NODE consisting of the EVALST7590 1 power line demonstration board and STEVAL PCCO12V1 connectivity gateway demonstration board This setup represents a complete node base node or service node More details about interconnection of different platforms to power line demonstration boards can be found in the UM1038 user manual Figure 4 EVALST7590 and STEVAL PCC012V1 block diagram UART ST7590 Ext uC Host interface 07509 Figure 5 EVALST7590 and STEVAL PCC012V1 real application Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Revision history 9 Revision history Table 9 Document revision history Date Revision Changes 15 Nov 201 1 1 Initial release ky Doc ID 018752 Rev 1 25 26 www BDTIC com ST UM1076 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services desc
6. Send commands void CmdMsgSnd MACEstReq unsigned char EUIA8 6 char Type char ARQ unsigned short CfB char AdditionalDataToSend short AdditionalDataToSendLength void CmdMsgSnd_MACEstInd void void CmdMsgSnd MACEstRes unsigned char ConnectionHandler 4 char Answer char AdditionalDataToSend short AdditionalDataToSendLength void CmdMsgSnd MACEstConf void Receive commands void CmdMsgRcv_MACEstReq unsigned char Buffer void CmdMsgRcv MACEstlnd unsigned char Buffer void CmdMsgRcv MACEstRes unsigned char Buffer void CmdMsgRcv MACEstConf unsigned char Buffer 5 5 MAC Release h Table 8 Available commands in MAC Release c file Commands Command code Filename MAC Relase Request lt 0 4 gt MAC Relase Indication lt 0xC5 gt MAC_Relase_Response lt 0 6 gt MA MAC Relase Confirm lt 0xC7 gt Send commands void CmdMsgSnd MACRelReq unsigned char ConnectionHandler 4 void CmdMsgSnd MACRellnd void void CmdMsgSnd MACRelRes unsigned char ConnectionHandler 4 char Answer void CmdMsgSnd MACRelConf void Lyr Doc ID 018752 Rev 1 11 26 www BDTIC com ST Commands UM1076 Receive commands void CmdMsgRcv MACRelReq unsigned char Buffer void CmdMsgRcv MACRellnd unsigned char Buffer void CmdMsgRcv MACRelRes unsigned char Buffer void CmdMsgRcv MACRelConf unsigned char Buffer 12 26 Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Library support files 6 6 1 Library support f
7. c DL UpdateReply xxx lt 0xAD gt lt 0xAE gt lt 0xAF gt DL_UpdateReply c PIB_LIST_GET_xxx lt 0xB1 gt lt 0xB2 gt PIB_LIST_GET c PIB_GET_xxx lt 0xB5 gt lt 0xB6 gt PIB_GET c PIB_SET_xxx lt 0xB7 gt lt 0xB8 gt PIB_SET c MAC MLME REGISTERSTATE Indication lt 0 9 gt MAC MLME c MAC TESTmode lt 0xBA gt MAC_TESTmode c MAC_Establish_xxx lt 0xC1 gt lt 0xC2 gt lt 0xC3 gt lt 0xC4 gt MAC_Establish c MAC Relase xxx lt 0xC5 gt lt 0xC6 gt lt 0xC7 gt MAC_Release c MAC_Join_xxx lt 0xC8 gt lt 0xC9 gt lt 0xCF gt lt 0xD0 gt MAC Join c MAC Leave xxx lt 0xCA gt lt 0xCB gt lt 0xDA gt MAC_Leave c MAC_Data_xxx lt 0xCC gt lt 0xCD gt lt 0xCE gt MAC_Data c MAC_Unregister_xxx lt 0xD1 gt lt 0xD2 gt lt 0xD3 gt MAC_Unregister c MAC_Promotion_xxx lt 0xD4 gt lt 0xD5 gt lt 0xD6 gt MAC_Promote c MAC_Demotion_xxx lt 0xD7 gt lt 0xD8 gt lt 0xD9 gt MAC_Demote c PHY_DATAxxx lt 0xE1 gt lt 0xE2 gt lt 0xE3 gt PHY_Data c PRIME_GetState PRIMEConfig SW Reset lt 0xB0 gt lt 0xB3 gt lt 0x90 gt cmd msg c 1 Referenced also as MAC MLME LIST GETxxx Doc ID 018752 Rev 1 a www BDTIC com ST UM1076 Global data structure in cmd msg h 4 Global data structure in cmd msg h The global data structure is used to inform the user about the result of the last used command define PHYDefine PHY HDR DATA SIZE 7 define MAX MESSAGE LENGTH 1024 define MAX SN LENGTH
8. 1024 struct ST7590 Status unsigned char Last Snd CMD ID unsigned char Last Rcv CMD ID unsigned char LastErrCode unsigned short LastStateField unsigned char LastResultCode unsigned char LastType unsigned short LastCfB unsigned char LastReleaseConnectionReason unsigned char LastConnectionHandler 4 unsigned char LastSNA 6 unsigned char LastEUI48 6 unsigned char LastReceivedMessage MAX MESSAGE LENGTH unsigned short LastReceivedMessageLength unsigned short TX Buffer Len Used unsigned short RX Buffer Len Used unsigned short LastSNLength unsigned char LastSN MAX SN LENGTH unsigned short LastDA Destination Address unsigned short LastSA Source Address unsigned char LastDSAP unsigned char LastSSAP unsigned char LastTXStatus TXS unsigned char Last C Link Class unsigned char LastStatus Link Class Doc ID 018752 Rev 1 7 26 www BDTIC com ST Global data structure in cmd msg h UM1076 unsigned char LastLR Length requested unsigned short PIBAttr unsigned short PIBListAttr unsigned char Level unsigned char Scheme unsigned long Timer unsigned char SNR unsigned char RQ Copy the data in the Data Indication message 10 are the LEN RQ fields size unsigned char PHY Header PHYDefine PHY HDR DATA SIZE char GetStateOk D extern struct ST7590 Status type ST7590 Status Table 2 Example of the field description and its link to the commands
9. 6 www BDTIC com ST Communication example UM1076 ActualStateEnum check external events ActualStateEnum InState int incomming packet COMMAND ID ActualStateEnum returnValue InState if Demonstration_data nodeldentification DEVICE CLIENT MASTER NODE if TIMER timeElapsed TimerCounter1 TIMER timeToElapse TimerCounter1 2000 timer to send message every 2 s returnValue CLIENT MASTER DATA SEND req incomming packet COMMAND ID check incomming packets ifinromming packet COMMAND ID CMD DATA INDICATION CODE TIMER timeToElapse TimerCounter2 300 timer to switch on the LED returnValue SERVER SLAVE DATA RECEIVE ind if inromming packet COMMAND ID CMD SYNCHRO INDICATION CODE TIMER timeToElapse TimerCounter4 5000 TIMER timeElapsed TimerCounter4 automatic desynchro request every 5 s end DesynchroRequest TIMER DisableTimer TimerCounter4 if TIMER_timeElapsed TimerCounter2 timer to switch off the LEDs GPIO SetBits ORANGE LED Port ORANGE LED Pin GPIO SetBits RED LED Port RED LED Pin TIMER DisableTimer TimerCounter2 22 26 Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Communication example return returnValue int check incomming packets void if RX buffer internal not empty return CheckFPMAevents 0 return 0 ky Doc ID 018752 Rev 1 23 26 www BDTIC com ST Real application UM1076 8 24 26 Real application
10. Reset void Receive commands not called by user void CmdMsgRcv_PrimeGetState unsigned char Buffer void CmdMsgRcv_PrimeConfig unsigned char Buffer MAC_MLME h Table 5 Available commands in MAC_MLME c file Commands Command code Filename MAC_MLME_REGISTERSTATE_Indication lt 0xB9 gt MAC_MLME c Send commands void CmdMsgSnd MACRegisterStatelndication void Receive commands void CmaMsgRcv MACRegisterlndication unsigned char Buffer MAC Data h Table 6 Available commands in MAC Data c file Commands Command code Filename MAC Data Request lt 0 gt MAC Data Confirm lt 0xCD gt MAC_Data c MAC_Data_Indication lt 0 gt Send commands void CmdMsgSnd MACDataReq unsigned char ConnectionHandler 4 char DataToSend short DataToSendLength void CmdMsgSnd MACDataConf void void CmdMsgSnd MACDatalnd void Receive commands void CmdMsgRcv MACDataReq unsigned char Buffer void CmdMsgRcv MACDataConf unsigned char Buffer void CmdMsgRcv MACDatalnd unsigned char Buffer Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Commands 5 4 MAC Establish h Table 7 Available commands in MAC Establish c file Commands Command code Filename MAC Establish Request lt 0xC0 gt MAC_Establish_Indication lt 0 1 gt MAC Data c MAC Establish Response lt 0 2 gt MAC Establish Confirm lt 0xC3 gt
11. T1 REMAPED 0 NULL 0 NULL 0 InitDevice if Demonstration_data nodeldentification DEVICE_CLIENT_MASTER_NODE return CLIENT MASTER DATA SEND req or else return SERVER SLAVE DATA SEND req ActualStateEnum client master data send req void ST7570 Status Data Last CONFIRM CODE LP NOT VALID CMD end DataRequest amp Demonstration data dataToSend 1 TIMER timeToElapse TimerCounter3 700 Confirm response interval is 290 560 ms return CLIENT MASTER DATA CONFIRM ind Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Communication example ActualStateEnum client master data receive ind void return IDLE STATE ActualStateEnum client master data confirm ind void if TIMER_timeElapsed TimerCounters return IDLE_STATE switch ST7570_Status__Data Last_CONFIRM_CODE case LP_NOT_VALID return CLIENT_MASTER_DATA_CONFIRM_ind case LP_OK if Demonstration data dataToSend 0x11 GPIO_ResetBits ORANGE_LED1_Port ORANGE_LED1_Pin or else GPIO_ResetBits RED_LED_Port RED LED Pin TIMER timeToElapse TimerCounter2 300 default return IDLE STATE ActualStateEnum server slave data send req void return IDLE STATE ActualStateEnum server slave data receive ind void if ST7570 Status Data Last P SDU 0 0x11 GPIO ResetBits ORANGE LED Port ORANGE LED1 Pin or else GPIO ResetBits RED LED Port RED LED Pin return IDLE STATE ky Doc ID 018752 Rev 1 21 2
12. he received State Field react with the corresponding action Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Library support files 6 4 stm32 uart h This file implements a buffered UART interface The beginning of the file is dedicated for physical definition of the pins of the microcontroller used for interface define TXD_RXD_remap 1 1 Remap TX PB6 RX PB7 define TXD_pin GPIO_Pin_6 used UART define TXD_port GPIOB used UART define RXD_pin GPIO_Pin_7 used UART define RXD_port GPIOB UART define TREQ_pin GPIO_Pin_9 T_REQ define TREQ port GPIOB T REQ define US1 0 define PLM US1 e This directive defines that PLM constant is UARTO of the microcontroller define DirectWrite This directive defines which function is used to write to UART e ComWrt ComWrt direct if DirectWrite defined all the data requested to be sent over UART is sent in one row and the application does not continue unless the transfer has finished e ComWrt ComWrt buff data is stored in buffer and sent by interrupt whenever there is computational time Functions for buffered UART parameter portNumber is present for legacy reason only has no influence on functionality void UART1 init void void UART2 init void e configures UART interfaces of the used microcontroller int GetlnQLen int portNumber char UART gives the length of the data present the input buffer for the c
13. history 25 2 26 Doc ID 018752 Rev 1 LI www BDTIC com ST UM1076 List of tables List of tables Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 Table 8 Table 9 Assignment of command names to the library files 6 Example of the field description and its linktothecommands 8 Steps used to communicate with the modem 9 Available commands in cmd msg cfile 9 Available commands in MAC ML MEccfile 10 Available commands in MAC Data c file 10 Available commands in MAC Establish cfile 11 Available commands in MAC Release c file 11 Document revision history 25 Doc ID 018752 Rev 1 3 26 www BDTIC com ST List of figures UM1076 List of figures Figure 1 Communication example application flowchart 17 Figure 2 Device registration sequence chart 18 Figure 3 Logical connection establishment seguencechart 19 Figure 4 EVALST7590 and STEVAL PCC0O12V1 blockdiagram 24 Figure 5 EVALST7590 and STEVAL PCCO12V1 real application 24 4 26 D
14. hosen UART int FlushOutQ int portNumber char UART clears the output buffer for the chosen UART int FlushInQ int portNumber char UART clears the input buffer for the chosen UART Doc ID 018752 Rev 1 15 26 www BDTIC com ST Library support files UM1076 16 26 int ComWrtByte int portNumber char byte char UART writes one byte to the chosen buffered UART int ComWrt buff int portNumber char buffer size t count char UART writes array buffer of size t length to chosen buffered UART void ComWrt direct int portNumber unsigned char data buffer unsigned short Nb bytes char USART e writes array buffer of size t length to chosen buffered UART int ComRd int portNumber char buffer int count char UART e reads data from chosen buffered UART to array buffer Count indicates number of bytes read char ComRaByte int portNumber char UART reads one byte from chosen buffered UART Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Communication example 7 7 1 a Communication example This communication example demonstrates two nodes in PRIME network base node and service node The service node sends a packet with data 0x11 or 0x22 every two seconds Whenever the base node receives 0x11 it switches on an LED If it receives 0x22 it switches it off This example application uses 3317590 library described the chapters above e Two files main c and fu
15. ical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2011 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com 26 26 Doc ID 018752 Rev 1 ky www BDTIC com ST
16. iles time counter h This file contain the prototype of the functions which implement the timers being used for precise timing when communicating with the modem or can be used for timing events in the user s own application The user can use up to six timers numbered from 0 to 5 typedef enum TimerCounterO 0 TimerCounter1 1 TimerCounter2 2 TimerCounter3 3 TimerCounter4 4 TimerCounter5 5 TimerNumberEnum Results define TimerElapsed 1 define TimerNotElapsed 0 define TimerDisabled 2000000000 Time in milliseconds define SHORTTIME 50 define ANSWERTIME7590 50 define TIMERSMAXCOUNT 6 void TIMER timeToElapse TimerNumberEnum TimerNo int ms e setthe timer TimerNo to ms milliseconds enables it and starts countdown int TIMER timeElapsed TimerNumberEnum TimerNo e ifthe timer TimerNo reaches zero this function returns TimerElapsed value e ifthe timer is disabled this function returns TimerElapsed value ifthe timer has not yet reached zero this function returns TimerNotElapsed void TIMER DisableTimer TimerNumberEnum TimerNo e disables the timer TimerNo void TIMER waitFor TimerNumberEnum TimerNo int ms e finishes after ms milliseconds using the timer TimerNo Doc ID 018752 Rev 1 13 26 www BDTIC com ST Library support files UM1076 6 2 6 3 14 26 void TIMER HW Init void configures the timer or SysTick hw used for timing history h This file contains the
17. nctions c Application flowchart Communication example application is described in detail by the flowchart in Figure 1 Figure 1 Communication example application flowchart Base node Service node Modem alive alive Registration flag set Registration flag set Communication done by PHY Communication done by USER Request for hannel 4 Establish channel Confirm channel gt Channel confirmed Check for incoming data Send a data if any toggle the LED Confirm the data 07512 Doc ID 018752 Rev 1 17 26 www BDTIC com ST Communication example UM1076 7 2 Communication seguence charts The registration process that is done automatically according to the PRIME specification see www prime alliance org is shown in Figure 2 Figure2 Device registration seguence chart BASE SWITCH j NODE HDR DO 0 op PKT LNID PKT SID j REG N 0 REG_Rsp HDR DO 1 PKT LNID REG Ger PKT SID j REG N 0 REG Gs HDR DO 0 PKT LNID K REGA REG SID j REG N 0 AM07511 18 26 Doc ID 018752 Rev 1 ky www BDTIC com ST UM1076 Communication example Usage of the PRIME primitives during establishment of the channel is described in detail in Figure 3 Figure 3 Logical connection establishment sequence chart
18. oc ID 018752 Rev 1 eo www BDTIC com ST UM1076 Library details 2 Library details Project created in IAR programming environment version 5 50 Target processor Any project tested on STM32 Language C language Reference ST7590 databrief ST7590 datasheet and product related documents for all details regarding the commands UM10368 hardware interconnection of the STM32 SPEAr M3xx and ST75xx ky Doc ID 018752 Rev 1 5 26 www BDTIC com ST Modem commands UM1076 3 6 26 Modem commands This section shows all the commands available with their codes together with corresponding filenames that the commands are located in The library implements all the commands the modem offers Table 1 shows in which library file the specific command can be found The in the command name stands for request response indication or confirm Table 1 Assignment of command names to the library files Command group CL432 Establish xxx Command codes lt 0xA0 gt lt 0 1 gt Filename CL432 Establish c CL432 Release xxx lt 0xA2 gt lt 0 gt CL432 Release c CL432 Join xxx lt 0 4 gt CL432 Join c CL432 Leave xxx lt 0 5 gt CL432 Leave c CL 432 GetSNSession lt 0 4 gt CL432 GetSNS c DL Data xxx 0xA6 lt 0 7 gt 0xA8 DL Data c DL Broadcast xxx lt 0 9 gt DL Broadcast c DL Reply xxx lt 0 gt lt 0xAB gt lt 0 gt DL Reply
19. ollers and its interconnection is described in the ST7590 databrief the UM1038 user manual and the ST7590 datasheet and product related documents November 2011 Doc ID 018752 Rev 1 1 26 www st com www BDTIC com ST Contents UM1076 Contents 1 Introduction TIE 1 2 Library details 4 44 27 doni e Qe ea e e e e dara a 5 3 Modem commands 6 4 Global data structure in cmd msg h 7 5 ve AHAAA UE s DN MM M ee 9 5 1 CMOLMSGLA EEN 9 5 2 MAG MEME h IIa rad te 10 5 3 MAC Dalai aaa ras 10 5 4 MAC Establish h sus uL xn RR ENG S RR E 11 5 5 MAC Release h 11 6 Library support files 13 6 1 counter n oreet E rre pm SE Sig ete AY Genes 13 6 2 betont dee ee ee by e 14 6 3 serial uus AREE RU eee ede aad ERE RA 14 6 4 stm32 uart h 15 7 Communication example 17 7 1 Application flowchart 17 7 2 Communication seguencecharts 18 7 3 MI 19 7 4 functions C og uu wa Ra exu ee a aux Rams d 20 8 Realapplication 24 9 Revision
20. prototype of the functions which implement a simple circular data logging system It logs 4 values ErrorCode StatusCode CommandCodeSnd and CommandCodeRcv whenever the putin function is called An array of the logged bytes ErrorEvidence can be investigated in the programming environment during debugging Array capacity is 4 x 255 bytes define maxerrors 255 unsigned char pointer struct unsigned char Error unsigned short Status unsigned char CommandSnd unsigned char CommandRcv ErrorEvidence maxerrors void initErrorList void e inits the data logger void char ErrorCode unsigned short StatusCode unsigned char CommandCodeSnd unsigned char CommandCodeRcv inserts the new values into the ErrorEvidence array serial port h This file contains functions that take care of incoming packets that were received by the power line modem According to the received packet the main function calls corresponding CMD rcv xxx functions from other files from Section 5 Function exported from file serial port h Called by user void SerialportDataRcv void This function is called automatically after some period of time after calling any CmdMsgSnd xxx command by user In order not to miss any incoming message the user should check the status of the CTS DEU FORCE line of ST7590 see the ST7590 datasheet and product related documents or call e g PRIME GetState regularly and according to t
21. ribed herein No license express or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with provisions different from the statements and or techn

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書等  取扱説明書等 - アイ・オー・データ機器  Operating Instructions K 2.100 - K 2.199  English Manual Katadyn PowerSurvivor 40E  User Manual  97573c Display-Teclado DIGITAL VDS-BUS2    WHOI-4-86  

Copyright © All rights reserved.
Failed to retrieve file