Post Go back to editing

AC period measuring problem

Category: Hardware
Product Number: ADP1048

Good day, ladies and gentlemen.

I am trying to make a student project (PFC) using an ADP1048 chip. I wrote the firmware for STM32 and a C# gui program. I can write registers, read registers and everything seems fine. I make a low input voltage (about 30 VAC) ( Also I have configured the PIN, VIN, VIN, VOUT parameters, respectively), and I get "1" in bit 3 Register 0xFE80—Latched Flag 0 -> AC_PERIOD, which means: "the controller is not able to detect the ac line period; the maximum value of the period is used"

I'm trying to fix it somehow and I'm looking at Register 0xFE25-VAC_THRESHOLD_SET, bit 7 "Enable automatic threshold". It's set to 0, and for some reason I can't set it to 1. I sent the number 0x80 to the 0xFE25 register, and immediately read it - I got 0x00. If I wrote, for example, 0x81, then when reading I got 0x01. I have two questions: please explain why I can't record this bit? And how to understand correctly what the [6:0] Threshold voltage bits are? How do I write them down correctly?

Thanks!

Esto