Skip to main content

STM32H562RGT6

Submitted by Dr. Leo Sparks on
STM32H562: FIELD NOTE #4

THE SDR POWERHOUSE: UNBOXING THE STM32H5

BY DR. LEO SPARKS & MR. OHM

Every spark starts with a question! Today’s question: "Can a single chip handle the complex math of a radio station while keeping its cool?" I just got my hands on the STM32H562RGT6, and let me tell you, this isn't just a brain—it's a high-speed math laboratory! 

[Leo sketches a glowing radio wave symbol in the air with his finger...]

The Chip Specs

Built on the Arm Cortex-M33 core, this chip screams at 250 MHz. With 2 Mbytes of Flash and 640 Kbytes of SRAM, it has more than enough "brain space" to store complex SDR algorithms and buffer incoming signals.

Analog Excellence: Catching the Wave

For an SDR, the front-end is everything. The STM32H562 features dual 12-bit ADCs capable of a blistering 5 Msps (Mega-samples per second). This allows us to sample Intermediate Frequencies (IF) directly with high precision.

On the output side, you have a 2-channel 12-bit DAC for analog reconstruction, but the real stars are the Serial Audio Interfaces (SAI) and I2S ports. These provide bit-perfect digital audio output to high-end codecs, making your radio signals sound crystal clear.

SDR Magic: Math Accelerators

Processing radio signals usually melts a standard CPU, but the H5 has secret weapons: the CORDIC and FMAC coprocessors.

  • FMAC (Filter Math Accelerator): Handles FIR and IIR filters in the background. It’s perfect for digital down-conversion without stressing the main CPU.
  • CORDIC: A dedicated hardware engine for trigonometric functions (Sine, Cosine, Arctan). In an SDR, this is vital for I/Q demodulation and calculating signal magnitude.

$$y[n] = \sum_{k=0}^{M} b_k \cdot x[n-k]$$

(The FIR Filter equation handled instantly by the FMAC)

🐾

MR. OHM’S STATIC ALERT:

"Leo is so excited about the CORDIC engine that he tried to use it to calculate the optimal 'rotation' for my catnip toy. I told him that as long as the chip doesn't interfere with my nap-frequencies, we're good. Just don't let those 250 MHz of static get near my tail!"

FEATURESPECIFICATIONSDR BENEFIT
CPU Speed250 MHz / 375 DMIPSHigh-speed DSP
ADC Speed5 Msps (12-bit)Wide Bandwidth Capture
Math AccelCORDIC & FMACCPU Offloading

The Eureka Moment

The STM32H562 is a bridge between the messy analog world and the precise digital realm. With its specialized math hardware, you can build a Software Defined Radio that fits in the palm of your hand without sacrificing the power of a desktop setup. It’s not just a chip; it's a gateway to the invisible spectrum around us!

Stay curious and keep those circuits humming!

- Dr. Leo Sparks

Who was Leonhard Euler?

Submitted by Dr. Leo Sparks on
RECORD: FIELD NOTE #3

THE ENGINE OF NATURE: DECODING $e$

BY DR. LEO SPARKS & MR. OHM

Every spark starts with a question! I was trying to figure out why the static from Mr. Ohm's fur discharges in a very specific, smooth curve rather than all at once. It turns out, nature doesn't like "jumps"—it prefers continuous growth. This brought me back to Leonhard Euler and his discovery of the most important number in calculus: $e$. 

[Leo's signature quirk: Sketches a glowing derivative $\frac{d}{dx}e^x = e^x$ in the air...]

The Simple Truth

Imagine you have \$1. If a bank gives you 100% interest once a year, you have $2. But if they compound it continuously—every microsecond of every day—you don't get infinite money. You hit a limit: $2.71828... This is the maximum "interest" the universe allows for perfect growth.

The Binomial Expansion: From Discrete to Continuous

Euler looked at the compound interest formula $(1 + 1/n)^n$ and asked: what happens as $n$ approaches infinity? To solve this, he used the Binomial Theorem to expand the expression into a sum of parts.

The expansion of $(1 + 1/n)^n$ yields a series of terms. Euler noticed that as $n$ becomes infinite, the terms $\frac{n(n-1)}{n^2}$ and $\frac{n(n-1)(n-2)}{n^3}$ all simplify to $1$. This left behind a beautiful, clean series of factorials:

$$ e = 1 + \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \frac{1}{4!} + \dots $$

The Power of the Taylor Series

Euler didn't stop at the constant $e$. He expanded this into the Taylor Series for $e^x$. This formula is the "blueprint" of growth, showing that every term is just a simpler piece of the whole curve. This is the only function that is its own derivative—it literally describes its own change!

$$ e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \dots $$

Euler's Formula: The Circle of $e$

By plugging an imaginary number into this Taylor series, Euler realized that growth turns into rotation. This led to Euler's Formula, linking the constant $e$ to sines and cosines. It’s the reason why my radio waves and AC circuits work!

🐾

MR. OHM’S STATIC ALERT:

"Leo says $e$ is 'natural' because it's everywhere. I say it's 'natural' because it describes exactly how much time I spend chasing my own tail in a perfect circle! If he spent half as much time on my lunch as he does on Taylor series, I'd have 'infinite' treats by now."

The Eureka Moment

From the limit of a bank account to the rotation of a circle in the imaginary plane, $e$ is the thread that connects all of mathematics. It tells us that growth, change, and oscillation are all different views of the same fundamental law. Next time you see a curve in nature, remember: there's probably a little bit of Euler's magic hidden inside.

Stay curious and keep those circuits humming!

- Dr. Leo Sparks

Tags

RLC filters

Submitted by Dr. Leo Sparks on
REMEMBER: FIELD NOTE #2

The Symphony of RLC Filters

BY DR. LEO SPARKS & MR. OHM

Every spark starts with a question! Have you ever wondered how your radio picks out exactly 101.1 MHz when the air is actually thick with a billion different signals? It’s like trying to hear a single cricket chirping in the middle of a thunderstorm!

[Leo sketches a glowing triangle of components in the air: a zigzag, a coil, and two parallel plates.]

To find that one voice, we need the "Gatekeepers of Frequency": the RLC Filter.

The Playground Swing Analogy

Imagine a playground swing. If you push it at any random time, it doesn't do much. But if you push it at just the right moment—the Resonant Frequency—it starts to soar. An RLC circuit is exactly like that swing. It ignores the "pushes" that are too fast or too slow, but it responds with massive energy to the one frequency it was designed for.

The Trio of Gatekeepers

Each component in an RLC filter has a specific job in controlling the "wiggle" of electricity:

  • Resistor ($R$): The peacekeeper. It controls the flow and prevents the circuit from oscillating out of control.
  • Inductor ($L$): The stubborn coil. It hates change in current. It lets slow signals through but blocks fast ones.
  • Capacitor ($C$): The energy sponge. It hates constant voltage. It lets fast signals through but blocks slow ones.

When you put them together, they form a Resonant Circuit that only likes a very specific frequency, $f_0$:

$$f_0 = \frac{1}{2\pi\sqrt{LC}}$$

This is the "Magic Tuning Formula." By changing the values of $L$ (the inductor) or $C$ (the capacitor), we can move our filter's "sweet spot" across the entire spectrum!

🐾

MR. OHM’S STATIC ALERT:

"Leo forgot to mention the 'Q Factor.' If your filter is too sharp, you might miss part of the signal. If it's too wide, you'll hear the neighbour's radio, too. Personally, I find the 60 Hz hum of the refrigerator to be the only frequency worth listening to—it's perfect for napping."

Tuning Examples

Inductance ($L$)Capacitance ($C$)Resonant Frequency ($f_0$)
10 $\mu$H100 pF~5.03 MHz
1 mH1 $\mu$F~5.03 kHz

The Eureka Moment

Great Galloping Galvanometers! Without RLC filters, the modern world would be a noisy mess of overlapping static. Because of these three humble components, we can isolate a single voice from across the ocean. We are essentially giving our circuits the power to focus.

Stay curious and keep those circuits humming!

- Dr. Leo Sparks

Tags

The Dance of Two Frequencies

Submitted by Dr. Leo Sparks on
CONFIDENTIAL: FIELD NOTE #1

The Dance of Two Frequencies

Investigating the Non-Linear Mixing of Sinusoids

A DEEP DIVE BY DR. LEO SPARKS

Every spark starts with a question! Today, Mr. Ohm and I are not just looking at the surface of the pond; we are diving to the bottom. We know that multiplying signals creates new frequencies. But why? And why does multiplying two Sines give us Cosines?

To understand this, we have to stop thinking about waves as "wiggles" and start thinking of them as rotating vectors (or "phasors," if you want to sound fancy at parties).

The Geometry of Rotation

Forget the time axis for a second. Imagine a clock hand spinning around. The tip of that hand traces a circle. If you look at that circle from the side, you see a wave moving up and down. That is our signal.

When we multiply two signals, we are effectively taking the length of one clock hand and scaling it by the position of another clock hand spinning at a different speed. The result is that the "combined" hand can't decide which way to spin—so it splits into two counter-rotating vectors.

The Mathematical Derivation

Let's convert our frequency $f$ into angular frequency, denoted by the Greek letter $\omega$ (omega), where $\omega = 2\pi f$. This makes the algebra much cleaner.

We start with two signals:

  • $v_1(t) = A \sin(\omega_1 t)$
  • $v_2(t) = B \sin(\omega_2 t)$

When we mix them, we multiply them. Let's assume amplitude $A = B = 1$ for simplicity:

The Goal: Calculate $\sin(\omega_1 t) \cdot \sin(\omega_2 t)$


Recall the trigonometric subtraction formulas:

1) $\cos(A - B) = \cos A \cos B + \sin A \sin B$
2) $\cos(A + B) = \cos A \cos B - \sin A \sin B$

Subtract equation (2) from equation (1):

$\cos(A - B) - \cos(A + B) = 2 \sin A \sin B$

Therefore, solving for our signals:

$$\sin(\omega_1 t) \sin(\omega_2 t) = \frac{1}{2} [\cos(\omega_1 t - \omega_2 t) - \cos(\omega_1 t + \omega_2 t)]$$

Look closely at the result! We started with Sines, but we ended up with Cosines. This tells us there is a 90-degree phase shift involved in the mixing process.

More importantly, the inputs $\omega_1$ and $\omega_2$ are gone. They have been replaced by the difference $(\omega_1 - \omega_2)$ and the sum $(\omega_1 + \omega_2)$.

Visualizing the Spectrum

If we looked at this on a Spectrum Analyzer, we would see two new spikes pushing outward from the center.

Input AInput BResult 1 (Difference)Result 2 (Sum)
1,000 Hz1,200 Hz200 Hz
(The Beat)
2,200 Hz
(The Buzz)

MR. OHM’S PRACTICAL CORNER:

"Leo loves the math, but here is the trap: The 'Difference' frequency can get messy. If $f_1$ is very close to $f_2$, the difference becomes almost zero (DC). In audio, this sounds like a weird 'wobble' or beat note. Filters are your friends, people!"

The Eureka Moment

Great Galloping Galvanometers! The math proves that multiplication is the engine of transformation. This simple trigonometric identity is the reason we have Wi-Fi, Bluetooth, and radio astronomy.

Stay curious, calculate carefully, and keep those circuits humming!

- Dr. Leo Sparks