Need Help Interpreting Unclear Reference Documents: MCU PA & Matching Network - Page 1
Forum section: electronics / rf-microwave

author: Diozoh
author_rank: Newbie
timestamp: October 03, 2020, 01:06:39 am
content: BackgroundI'm trying to design a device with an STM32WL series MCU using the UFBGA-73 package. There is only one reference schematic given for the RF portion of the MCU in an application note (https://www.st.com/resource/en/application_note/dm00660594-optimized-rf-board-layout-for-stm32wl-series-stmicroelectronics.pdf, pg. 6) and the examples given in the document use the same package, so the pins are identical.There are 4 controlled-impedance RF signal pins, 2 for RX and 2 for TX:RFI_P: Positive differential input (RX+, 100Ω).RFI_N: Negative differential input (RX-, 100Ω).RFO_HP: Low power output (TX, 50Ω).RFO_LP: High power output (TX, 50Ω).From my understanding of the MCU documentation regarding connections to these pins:The pinVR_PAoutputs a supply from the internal PA (power amplifier)The PA that outputs onVR_PAis itself is supplied from an external input to theVDDPApin.When using high power (RFO_HP) mode, the external supply forVDDPAis required to be full voltage (e.g. 3.3V, specified as same input to SMPS).When using high power (RFO_HP)VDDPAmust be connected to a different supply (specified as SMPS feedback pin, 1.55V).There is also this warning (emphasis added):QuoteI want to use a specific configuration in whichbothlow and high power are available.Another application notehttps://www.st.com/resource/en/application_note/dm00660597-migrating-from-stm32l0-stm32l1-stm32l4-series-associated-with-sx12xx-radio-to-stm32wlex-microcontrollers-stmicroelectronics.pdf, pg.᠎8᠎) shows a configuration for using both power levels and provides a single image for this configuration while recommends using DC switches:Translated into KiCad I have this schematic using switches as recommended:As mentioned at the beginning, there is asinglereference schematic for an RF circuit used in an unreleasedMB1552Bwhich is given as an image (below) in the first application note.This board uses an RF switch for choosing either TX or RX to the antenna connector from an external input and is configured for using RFO_HP but can be switched to RFO_LP via "permanent" solder connections, assumed to be for testing purposes.In all references theVR_PApin appears to be connected via an "inductor" (no value is ever given in any document) to eitherRFO_HP*or*RFO_LPdepending on the chosen TX power level.QuestionsI have two issues, one about the power amplifier connection to the TX line and one about the general content of the reference circuit.1. Component FunctionMost of the components don't have values, so it feels like an educated guessing game to figure out what they're for. I've included a rough interpretation of what I think they might be for in the image below.Please let me know if this seems reasonable or if you have any thoughts, as I said this isthe bestreference for this device so any input is appreciated.2. PA connection to TX (choke?)I am under the impression that the "inductor" (L3connectingVR_PAto the TX line in the reference is acting as a choke to block noise from the PA but as I have never worked with RF before I am not totally sure why you would bias the TX signal with DC from the PA (is that how it amplifies the signal?).Assuming it is a choke then I should theoretically be able to use the same inductor (assuming it can handle the power) for bothRFO_HPandRFO_LPbecause the blocking properties would not be related to power level.I am using an RF switch for selecting the power level as shown in the KiCad image above, using the same signal that is used for toggling the two other switches (i.e. control input at each "LP" into a switch in the image).Can I use a single inductor to connect the currently active PA to the currently active RFO as shown in the images below?As a side note I have seen guidelines for the choke impedance to be 10x the impedance to 10x50 = 500Ω, please let me know if this is appropriate/correct.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 03, 2020, 02:49:42 am
content: Man, for all that discussion about good layout they really shit the bed underneath the BGA. Traces routed onall layers?Not a single contiguous power plane. Yikes.Their cautions for ground vias I think are a little overdone. This isn't even a GHz, and it's only 50 ohms, it's not like it's a big power transistor doing watts (from a terminal impedance of ~ohms). I'd still use plenty of vias, but I don't think it's necessary to go overboard with double rows of them, with quite the density they show. I guess RX and TX aren't full duplex, so it wouldn't seem terribly important to have a lot of isolation between them either. (If they were, that would be good justification though.)And other quibbles about their notes on components and footprints and routing. But none of that is really all that important...Quote from: Diozoh on October 03, 2020, 01:06:39 amYeah, that's generally the right idea. A filter can do impedance matching as well, and impedance matching networks are often filters themselves*. For narrowband like this, we're more likely to use sections of resonant tanks (L and Pi networks, C dividers), avoiding the use of custom transformers.*Which, there aren't really any exceptions, just cases that aren't very important -- a transformer might not have a very precise LF cutoff, and might have a complicated HF cutoff (including a shift to other impedance ratios and phase shifts!). So we tend to use wideband transformers as ideal transformers (with excess bandwidth), then add filters around to get a more precise and well-behaved response.I'm a bit curious about the bypass cap values, because 33pF is only 4.5 ohms at 1GHz -- a mere 10% of the load impedance, at thehighestfrequency of interest. So they'd really not be bypass caps at the low end. It's not clear what frequency this was intended for. And as you say, they don't give component values for the networks. And yet, the power distribution networks (PDNs) are networks themselves, that cannot be separated from the circuit but are a necessary part of it as well. So it's rather odd to give just those values.C15 would be big enough to be a "bulk cap" sort of value though, so at least there's that.Also odd that C27 is NC; a capacitive divider might be desired there. But at least it's placed, so, maybe it is used after all?...And C25 having a value; though as a coupling cap, it's not an implausible value towards the high end (over 500MHz say).Anyway -- the networks.I would guess:- Everything is around 50 ohms. So we should expect little actual impedance matching is necessary. Though the appnote doesn't show what the port impedances need to be, so maybe some is still necessary, I don't know.- Notice 100 ohms differential is just two 50 ohm normal-mode circuits wired in series, i.e. phased oppositely.- L6 for matching probably, sure, and harmonic filtering.Sometimes this is a capacitance (acting in parallel with the internal transistor capacitance), but that might also not be possible, which would be because of bondwire, pad and trace inductance causing the two capacitances to resonate against each other, rather than acting in parallel.Also depends on the amp structure: at lower frequencies (e.g., NFC transceivers), the pin drivers are usually CMOS (i.e., regular old complementary inverters, pulling to VCC/GND alternately; class D more or less), and so a full squarewave is outputted, and a series inductor is needed to provide a high impedance to the square wave's harmonics. The harmonics are reflected back to the pin, in phase, i.e., current is just not drawn from the supply in the first place -- saving power.The RFC in this case, does suggest a single ended (class A to C) PA, open drain, internally biased. This could have either kind of network, for the aforementioned reasons.Could also be class E, though I'd expect a different network: probably L3 first, then L6.Probably the datasheet tells more about this.- L3, RFC, definitely. An RFC is distinguished by having a large impedance at the operating frequency. So, it's a choke, it blocks AC current. As above, it could also be resonant, but it seems unlikely just from what's shown here.- C20-C22 and others: an odd bandpass. What this will do, or what it can do at least, is give a lowpass response (C20, L4, C21, L5, C22) with one zero (C17 and L4). C19 gives a single pole highpass response, and having a relatively large value given, suggests it's intended as coupling. (L3 and C19 do act together as a 2-pole highpass, and their values can be adjusted to give a desired filter characteristic at LF.)- The receive network seems to be more about phase shift than filtering. The C dividers are, well, not all-pass, but at best single-pole, not a strong filter. L8 is in series between phases: presumably it will be resonant with C30 and (C36 || C27), which will be equal values, to give complementary phases. This is complicated by the antenna impedance coming in from the switch, along the capacitor divider (C36 + C27), which imbalances the see-saw so that we shouldn't expect a perfect 180 degree phase shift.Notice the... "geometry" of the CLC network: if the two Cs are equal impedance, then they will move oppositely at resonance. That is, the inductor resonates with one effective capacitance, which is both in series; the midpoint of that effective capacitance just happens to be grounded, so the two ends move like a see-saw. Same thing in the Colpitts oscillator, etc.But if we imbalance one with resistance, it's not going to have the perfect 90 degree V/I phase shift of the capacitor, so the total phase between inputs won't be quite 180. This could be balanced by giving C30 some ESR, at some expense to insertion loss; probably the input CMRR is good enough that this isn't important.We could also use a small CMC as a balun, or use a centertapped L8 and ground that, or use a proper (parallel type) balun (nearly the same thing), or use a longer LC network that basically implements the lumped equivalent of a 180 degree transmission line hybrid.Or if we're using separate antennas, we could use differential routing to a differential antenna (with whatever applicable filtering also being differential) straight away.- Finally, the antenna network. This may primarily be for harmonic filtering, and probably it doesn't hurt to filter other external signals, like, you don't want a nearby fractional-watt of 2.45GHz WiFi blowing out the receiver. The connector suggests 50 ohm (or similar) output, and presumably you'd use an already matched antenna.If the connector isn't used at 50 ohms, it may be for tuning the antenna and transmission line together. This puts SWR on the TL, and its length matters (because the standing waves reflect at some phase shift depending on the line length). If the line is short, or not very lossy (twin lead is generally better than coax, for example*), high SWR can be acceptable. At longer lengths, you'll just burn up so much more loss (effectively the signal passes ~SWR times through the TL, multiplying losses) that matching at both ends may be very attractive.*Which should still be reasonably true in PCB or flex, I think. That is, differential microstrip, but with no ground at all, just the pair out in free space (less the dielectric they're riding on). I suppose most of the loss is due to PCB dielectric, and the conductors aren't such a big deal by themselves. Which means flex should be pretty nice: it's thin, the dielectric is mostly air. I think I would wonder about impedance error though, and common mode balance -- it's not like you can twist the stuff very well to make twisted pair.QuoteMentioned above -- the internal structure is probably an open drain, thus needing bias voltage to function.Oh, and regarding placement before or after L6, if it's an RFC it shouldn't matter much; if it's doing something important, it will matter. Again, can't tell from here.QuoteThat should be fine, yes.QuoteNo, or at least I wouldn't recommend it. (Is this a screenshot, or modified from the earlier one?) The switch's resistance and capacitance (and any higher order structure inside it?) are directly in the signal path, at the point of highest bandwidth, on the pin most critical of impedance. Especially at harmonics.Probably, these pins are open-drain, and the choke supply allows flyback voltage as well, i.e. the 3.1V supply can saturate down to ~0V, and peak to 6.2V (or more in class E) in cutoff. You'd also need a switch that can handle this voltage range. (The low voltage setting might be possible, but still iffy if it's class E.)Useful fact: RF transistors are almost entirely specified this way, i.e. with old school "design center" ratings. The actual Vds(max) or Vceo ratings are several times higher than the maximum DC voltages given. Partly because they assume an inductive (RFC or transformer) pullup.Which also means, Ye Olde vacuum tubes, which were rated in this way, might've been rated 500VDC for example, across a modest, say... 2.5mm pin spacing. But that means they were actually expected to handle 1kV or more in absolute maximum terms. And many of them did, or even more (TV deflection requiring peak voltages of 1.5kV or more). Which is still perfectly fine for the glass body, or the vacuum within, but those old phenolic wafer sockets, once they got a little dusty?...QuoteYeah, or even 5x or 3x may be adequate. Depends on desired flatness, how tight the bandwidth is (in the narrowband case, you use some fraction of Zo instead, and resonate it with a capacitor), and the parasitic characteristics of parts available in those values (i.e., you can't just use any old 10uH SMPS choke because it'll have stupid resonances in the 100s MHz).Tim

author: Diozoh
author_rank: Newbie
timestamp: October 03, 2020, 03:46:15 am
content: Thank you Tim, this is incredibly helpful. The gaps in documentation mean that it's not a very easy starting point for my first design ever (this is for an honours thesis project).QuoteWith my limited knowledge it did seem a bit strange. I'm already assuming that via-in-pad is mandatory if I want to route on the top layer and a lot of the bottom layer directly beneath the BGA is being consumed by decoupling caps for the VDD/GND pairs.What would you recommend doing differently to their guidelines?QuoteThat was my interpretation as well, but it's nice to hear confirmationQuoteIt was modified form the previous one, I was at work at the time and it was a slow day...My main concern with the "single inductor to RFO" approach was if the switching speeds don't line up and you send too much voltage to the RFO_LP (as per the warning).Ideally I want the RF lines to be as short as possible to minimize board dimensions. In yet another AN for a different but related 2.4GHz MCU (https://www.st.com/resource/en/application_note/dm00504903-development-of-rf-hardware-using-stm32wb-microcontrollers-stmicroelectronics.pdf, pg. 32) they talk about using an integrated passive device (IPD) for filtering/matching which seems like a good way to save space.I have come across their balun (BALF-SPI2-01D3) for the S2-LP which seems like it might be close to an IPD (same frequencies, 50Ω, TX, Diff. RX) but from what I can tell the RX is expected by the S2-LP at 200Ω (i.e. 100) unlike the STM32WL so the balun is designed for that.Balun DS:https://www.st.com/resource/en/datasheet/balf-spi2-01d3.pdfS2-LP DS:https://www.st.com/resource/en/datasheet/s2-lp.pdfDo you have any suggestions for finding other similar components? I'm aiming at 915 MHz operation.

author: jacky4566
author_rank: Newbie
timestamp: January 15, 2021, 05:03:11 pm
content: I've started work on my own WL5 board and would like to poke your brain @Diozoh and @T3sl4co1l.I found the PCB reference documents here:https://community.st.com/s/question/0D53W00000FzAd6SAF/mb1552b-board-stm32wl-reference-layout-bom-and-schematic-But they appear to have mixed up high and low power.The document titledSTM32WL_UFQFPN48_REF_BOARD_High_Power_High_Band_868-915MHz.pdfShows a schematic with RFO_HP OPEN and RFO_LP connected. Is this correct or backwards?Also, if possible, are you able to share you final RF design? I would be curious to see your choices in caps/inductors.A single 50ohm balun solution would be fantastic for our super tight packaging. I wonder if ST is working on for the WL series.