| Datenblatt-Suchmaschine für elektronische Bauteile |
|
UM1573 Datenblatt(PDF) 11 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1573 Datenblatt(HTML) 11 Page - STMicroelectronics |
|
11 / 27 page ![]() UM1573 ST7540 stack firmware code Doc ID 023619 Rev 1 11/27 PLM_InitStructure.PLM_HeaderPreamble = HEADER_PREAMBLE_VALUE; PLM_InitStructure.PLM_BandpassFrequency = PLM_PB_FREQ_132KHz; PLM_InitStructure.PLM_BaudRate = PLM_BAUDRATE_2400; PLM_InitStructure.PLM_Deviation = PLM_DEVIATION_05; PLM_InitStructure.PLM_PreFilter = PLM_PRE_FILTER_ON; PLM_InitStructure.PLM_Sensitivity = PLM_SENSITIVITY_HIGH; In order to load the parameters, initialize the PLM variables, reset and put the device in IDLE mode, the following APIs must be used: PLM_Init(&PLM_InitStructure); PLM_Reset(); 2.1.2 Receiving data from power line modem The following API enables the PLM to receive data from the power line. As soon as a data frame is received, before receiving the next data frame, the function must be called again: void PLM_StartReceiveData(void); The next instruction notifies when a data frame has arrived and is ready to be read. if (PLM_FrameArrived()) { ... } Another instruction can be used instead to test if a data frame is ready in the PLM buffer, and if this is the case, it automatically removes the header and the redundancy (FEC), and checks if the data frame has a correct postamble. The data reception is automatically enabled by this API if the frame is rejected. if (PLM_ValidFrameArrived()) { ... } If valid data has arrived, the data length and the received data buffer are recovered by the following APIs: /* Recover received data frame length */ uint8_t plm_len = PLM_GetBufferLength(); /* Points to PLM data buffer */ uint8_t *plm_buffer = PLM_GetReceivedBufferPointer(); 2.1.3 Transmitting data to power line modem Before transmitting data, the user should check if the band is already in use (this can happen if another device is transmitting data and the PLM detects a header sequence). if (!PLM_BandInUse()) { ... } |
|
Link URL |
| War ALLDATASHEET hilfreich? [ DONATE ] |
Über Alldatasheet | Werbung | Kontakt | Privatsphäre und Datenschutz | Link zum Datenblatt | Linktausch | Hersteller All Rights Reserved©Alldatasheet.com |
| 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 |