{"uid":"cap_d9ieru3WdQdv3jWrYBERb","slug":"stm32-clock-tree-calculator-8728d114","name":"STM32 Clock Tree Calculator","description":"Calculate STM32F103 and STM32F407 RCC PLL, AHB, APB and timer clock frequencies","url":"https://api.rocads.com.mx/v1/embedded/stm32/clock-tree?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":null,"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.015","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_P8Z_hvCN0qEIocbkGAJNS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.015","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates RCC PLL, AHB, APB, and timer clock frequencies for STM32F103 and STM32F407 microcontrollers","exampleAgentPrompt":"Calculate the clock tree frequencies for an STM32F103 running on an 8 MHz HSE crystal with PLL multiplier x9, AHB prescaler /1, APB1 prescaler /2, and APB2 prescaler /1 — I need SYSCLK, AHB, APB1, APB2, and timer clock values.","exampleUseCases":[{"title":"Verify 72 MHz STM32F103 configuration","prompt":"I'm setting up an STM32F103 with an 8 MHz external crystal, PLL x9, no AHB prescaler, APB1 divided by 2, APB2 no division — can you verify I'll hit 72 MHz SYSCLK and tell me what the timer clocks will be?"},{"title":"STM32F407 168 MHz PLL design","prompt":"For an STM32F407 with a 25 MHz HSE, PLLM=25, PLLN=336, PLLP=2, AHB prescaler /1, APB1 /4, APB2 /2, calculate all the bus and timer clock frequencies so I can configure my UART and timer peripherals correctly."},{"title":"Embedded firmware timer PWM frequency planning","prompt":"I need to know what timer clock frequency I'll get on an STM32F103 with a 16 MHz HSI, PLL x4.5, APB1 divided by 2 — I'm trying to figure out the prescaler values to hit a 20 kHz PWM frequency."}],"resultDescription":"Returns computed clock frequencies for all major clock tree nodes including SYSCLK, HCLK (AHB), PCLK1 (APB1), PCLK2 (APB2), and the multiplied timer clocks derived from APB prescalers, specific to the selected STM32 microcontroller variant (F103 or F407).","failureModes":["Invalid STM32 model specified (only F103 and F407 supported)","PLL configuration results in out-of-spec frequency (e.g. exceeding 72 MHz for F103 or 168 MHz for F407)","Missing required RCC register fields in request body","HSE/HSI frequency out of supported range","Invalid prescaler values not matching allowed enumerations"],"whenToPreferThis":"Choose this endpoint when you need precise, authoritative clock frequency derivation for STM32F103 or STM32F407 microcontrollers without manually working through the RCC clock tree math. It is especially useful when configuring timer peripherals, UART baud rate generators, or verifying that a given PLL/prescaler combination meets timing constraints. Prefer this over manual calculation or generic embedded tools when targeting specifically these two STM32 families.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T18:31:28.151Z","isFirstParty":false,"canonicalSlug":"stm32-clock-tree-calculator-8728d114"}