voelkerb / STPM3X

Library for the ST Power Monitor Chip STPM32 and STPM34.
Creative Commons Zero v1.0 Universal
5 stars 1 forks source link

Reading Out Active and Reactive energy pulse #5

Open aaltonen1024 opened 3 hours ago

aaltonen1024 commented 3 hours ago

Hi, is there a way to configure the Energy pulses as an output so that I can read it on an oscilloscope? I've read in the datasheet that there are 2 pins (LED1 and LED2) which are primary and secondary channel energies. How can I implement this in, let's say, the example code?

voelkerb commented 3 hours ago

Sure this can be implemented in the library. The behaviour of the LED1 and 2 pins can be configured in DSP_CR1 and DSP_CR3, respectively (pulse speed, pulse output power (active, reactive fundamental, apparent), channel etc. The corresponding settings can be found in the data-sheet at page 62ff. Feel free to implement it as part of the library.