cancel
Showing results for 
Search instead for 
Did you mean: 

STPM32 Interrupt pin behaviour

ARose.6
Associate

hello,

I do have a question about the INT1 pin behaviour of the STPM32.

I measured all pins with a saleae logic pro 16 and decoded the spi communication also.

From the beginning, the initialization routine looks as described in the datasheet.0693W00000aInT7QAK.pngIt is at least 35 ms from enable to DSP Reset (through syn pin toggle 3 times).

SPI is selected through cs low on enable sequence.

There are 2 potis connected to the VIP1 and IIP1. VIN1 and IIN1 are connected to GND.

The voltage of the potis range from 0 V to +280 mV.

On startup, both poti voltages are GND.

Also to note: the interrupt pin is pulled to vcc on the mcu side. (VCC is 3.3V).

The frames sent:

First, configure DFE_CR1 -> enC1, GAIN1 = 0 (x2)

read out DSP_CR6, calculate new current swell for interrupt, set to SWC_THR1 and write back to DSP_CR6

then set DSP_IRQ1 C1_IRQ_CR to 0xC (Swell start and end event to trigger interrupt).

then for a reset of sag and swell time register, set DSP_CR1 ClearSS1 Bit and also clear status register DSP_SR1.

But as you can see, the interrupt line is still asserted since beginning.

For just an example i read out the DSP_SR1, DSP_IRQ1 and DSP_EV1 register to see what is going on in the STPM32.

The values read seem to be ok.

When i turn the poti connected to IIP1 and the current rms value passes the swell, the interrupt line is deasserted and status register is updated.

But if the current swell is reached again, no interrupt is asserted until i clear the status reg.

This means i am not able to drive this sensor just interrupt driven.

For now i only want it to report if the current swell is reached.

I can post the complete frames send if there is need to.

Do i miss something else?

Thanks in advance and best regards,

Alex

2 REPLIES 2
SRANN.1
Associate

Hello,

First of all, the INT pins should not be pulled up, they're push-pull output.

I have a question about the signal applied to Vin and Iin pins: is it a DC voltage? If yes, did you disable the internal high-pass filter (BHPFV1 and BHFC1 bits in DSP_CR1)? If not, only AC voltages can be processed by the device.

I suggest to check also the swell threshold and your setup. When a swell event is detected, the INT should be asserted and not deasserted.

Regards

Salvatore Ranno

Senior Application Engineer

salvatore.ranno@st.com

SRANN.1
Associate

I'd like to ask you another question: what does "poti" mean?

Thanks