| поискавой системы для электроныых деталей |
|
AN2799 датащи(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2799 датащи(HTML) 9 Page - STMicroelectronics |
|
9 / 14 page ![]() AN2799 Firmware description 9/14 4.1.1 Attributes The object attributes are described as follows: ● m_Voltage: “private” variable containing the last read voltage in mV ● m_Current: “private” variable containing the last read current in mA ● m_Energy: “private” variable containing the last read energy in mW ● Registers: “public” structured variables containing the STPM01 registers: – DAP: type0 active energy – DRP: reactive energy – DSP: apparent energy – DFP: type1 energy – DEV: RMS values of measured voltage and current – DMV: instantaneous values of measured voltage and current – CFL: lower part of the configuration register – CFH: higher part of the configuration register ● Signals: “public” structured variables containing the signals descriptor used to interface STM32 with STPM01: – PM_SCS: this signal enables the SPI operation when low – PM_SYN: When SCS is low, this signal selects the read or write operation. When both SCS and SYN signals are high, the results of the input or output data are transferred to the transmission latches. – PM_SDA: SPI MISO signal. This signal is used as the STPM01 data signal. The direction of this signal depends on the SYN signal. – PM_SCLK: SPI clock signal Each signal descriptor contains the STM32 port and pin number. For further details about SPM01 registers and the microcontroller interface, please refer to the STPM01 datasheet. 4.1.2 Methods The object methods are implemented by means of pointers to functions which are described as follows: ● Create: this function initializes all power meter object elements (properties and methods). ● Destroy: not used. Implemented to have a general object implementation. ● Init: this function initializes the power meter object properties and the power meter signals putting them in the idle state. ● Reset: this function executes the reset sequence to perform the “remote reset” operation of the STPM01 ( Figure 4). ● SetSignals: this function initializes the “signals” attribute of the power meter object and configures the GPIOs related to the signals. ● GetSignals: this function retrieves the “signals” attribute of the power meter object. ● SetCfgRegMode: this function sets the STPM01 configuration register as shadow latches or OTP. In current AN firmware the STPM01 is configured to use the shadow latches for the configuration for testing reasons. |
|
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |