📄 plm_fw_4_01_file_desc.txt
字号:
1 - FILES DESCRIPTION
Global.h
In this file are defined and exported the global typedefs, macros, variables and are included all .h files related to PLC
Appli (.c and .h)
In these files are defined:
- The function "void App_init(void)" that is the general initialization function for the application. This function calls the initialization sub-functions of all blocks used for PLC
- The function "void USER_Application(void)" that is the function that manages the state of application and updates the WD
- The function "void App_main()" that is called after reset and where is present the infinite loop that calls the function "void USER_Application(void)"
CRC (.c and .h)
In these file are defined and exported the structures and the functions used to calculate the CRC (Cyclic Redundancy Check) used for Ping section.
debug.h
In this files are defined the macros used for debug purposes
Int_7265 (.c and .h)
In these files are defined the ISR called when an Interrupt occurs
IO (.c and .h)
In these files are defined and exported the function used to initialize and modify the state of I/O control lines, excluded the lines used to communicates with PLM
Phy_Layer (.c and .h)
In these files are defined and exported the function used to:
- Initialize the PLM communication interface
- transmit and receive data across the Mains through PLM
- access to PLM Control Register
ping (.c and .h)
In these files are defined and exported the function used to manage a simple protocol implementation called "ping"
PLM_Map_7265 (.c and .h)
In these files are defined and exported all HW resources of uc ST72F651
timer (.c and .h)
In these files are defined and exported the function used to:
- Inilitiate and update Timer block
- Manage Timeouts
2 - MAIN LOOP
The main loop is in the "void App_main()" function (file "Appli.c")
3 - INTERRUPT USED
Interrupt functions are defined in file "Int_7265.c". For Power Line Communication section two Interrupt Service Routines are used:
a) Timer
When Timer Interrupt occurs is updated the internal timing count that is used to generate timeouts with a time resolution of 1 ms.
The function called when a Timer Interrupt occurs is "void INT_TIM(void)" (file "Int_7265.c") that calls the function "void TIMER_Interrupt(void)" defined in file "Timer.c".
b) CLR/T line
When a edge is detected on CLR/T line (line PA5 of ST72F651) a call to "void INT_EI0(void)" (file "Int_7265.c") is performed. This function calls "void SPI_Interrupt(void)" defined in file "Phy_Layer.c". This routine manages data to send/receive data to/from Power Line Modem (data can be related to Mains Communication or Control Register Access).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -