| Datenblatt-Suchmaschine für elektronische Bauteile |
|
UM1573 Datenblatt(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1573 Datenblatt(HTML) 10 Page - STMicroelectronics |
|
10 / 27 page ![]() ST7540 stack firmware code UM1573 10/27 Doc ID 023619 Rev 1 The first group returns some flags indicating if the band is in use by another device, if the current data frame has been sent or a data frame is received and if the received frame is a valid frame. uint8_t PLM_BandInUse(void); uint8_t PLM_FrameSent(void); uint8_t PLM_FrameArrived(void); uint8_t PLM_ValidFrameArrived(void); The next group of APIs is used to send and receive a data frame. void PLM_SendData(uint8_t *buffer, uint8_t len); void PLM_StartReceiveData(void); uint8_t PLM_GetBufferLength(void); uint8_t* PLM_GetReceivedBufferPointer(void); There are also some APIs used for low level statistics, returning the number of FEC corrections done in the arrived frame and the wrong postamble indication. uint8_t PLM_GetFECCorrections(void); PLM_WP_TypeDef PLM_GetWrongPostamble(void); The last group of driver APIs are used for the PLM reset and internal register write/read operations. void PLM_Reset(void); void PLM_WriteRegisters(uint8_t *buffer, uint8_t len); void PLM_StartReadRegisters(void);? 2.1.1 PLM initialization In this section, the instructions sequence on how to configure and use the ST7540 driver is shown. First, the PLM must be initialized and configured by filling the init structures: PLM_IntPriorityInitTypeDef PLM_InterruptInitStructure; PLM_InitTypeDef PLM_InitStructure; Configuring the PLM device and setting the correct interrupt priorities defined in the macros PLM_SPI_INT_PREEMPTY_PRIORITY and PLM_SPI_INT_SUB_PRIORITY for the SPI and PLM_CDPD_PREEMPTY_PRIORITY and PLM_CDPD_SUB_PRIORITY for the CDPD external interrupt pin, is done with the instructions: PLM_InterruptInitStructure.PLM_SPI_PreemptyPriority = PLM_SPI_INT_PREEMPTY_PRIORITY; PLM_InterruptInitStructure.PLM_SPI_SubPriority = PLM_SPI_INT_SUB_PRIORITY; PLM_InterruptInitStructure.PLM_CDPD_PreemptyPriority = PLM_CDPD_PREEMPTY_PRIORITY; PLM_InterruptInitStructure.PLM_CDPD_SubPriority = PLM_CDPD_SUB_PRIORITY; PLM_PeripheralInit(&PLM_InterruptInitStructure); The PLM parameters configuration, assigning the wanted values, is done with the code shown here below. In this example, PLM is configured with a bandpass filter of 132.5 KHz, a data baud rate of 2400 bps, deviation of 0.5 and high sensitivity with the prefilter on. Please refer to the ST7540 datasheets for more details on PLM parameters. |
|
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 |