{"uid":"cap_N64S3oUBPk3ClyYgpZLmj","slug":"stm32-timer-and-pwm-calculator-fb2fc3df","name":"STM32 Timer and PWM Calculator","description":"STM32 timer and PWM calculation service","url":"https://api.rocads.com.mx/v1/embedded/stm32/timer?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":null,"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5yirfnxUtTfTPvgZIduCK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates STM32 microcontroller timer configuration registers and PWM parameters given desired frequency, prescaler, and duty cycle inputs","exampleAgentPrompt":"Calculate the STM32 timer registers I need to generate a 50Hz PWM signal with a 7.5% duty cycle, assuming a peripheral clock of 72MHz — give me the PSC, ARR, and CCR values.","exampleUseCases":[{"title":"Servo motor PWM configuration","prompt":"I'm driving a servo motor with an STM32F103 running at 72MHz and I need a 50Hz PWM signal with a pulse width of 1.5ms — can you calculate the correct PSC, ARR, and CCR register values for me?"},{"title":"LED dimming with precise duty cycle","prompt":"I want to dim an LED using STM32 PWM at 10kHz with exactly 40% duty cycle, my timer clock is 48MHz — what prescaler, auto-reload, and compare register values should I use?"},{"title":"Motor driver PWM frequency tuning","prompt":"My STM32G0 peripheral clock is 64MHz and I need to drive a motor controller at 20kHz PWM — calculate the PSC and ARR values I need, and the CCR for 60% duty cycle."}],"resultDescription":"Returns computed STM32 timer register values including prescaler (PSC), auto-reload register (ARR), and capture/compare register (CCR) values that will produce the requested timer frequency and PWM duty cycle on the target STM32 device, given the input clock frequency.","failureModes":["Invalid or out-of-range clock frequency causing division-by-zero or overflow in register calculation","Requested frequency not achievable with 16-bit or 32-bit timer limits — returns error or nearest approximation","Missing required input fields such as clock frequency or target frequency","Duty cycle out of 0–100% range returns validation error","Prescaler or ARR exceeding maximum register width for specified timer type"],"whenToPreferThis":"Use this endpoint when you need to quickly and accurately compute STM32 hardware timer register values without manually doing the integer arithmetic or risking off-by-one errors. Ideal for embedded developers who know their desired PWM frequency and duty cycle but want the exact PSC, ARR, and CCR values calculated automatically for a given STM32 peripheral clock speed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:32:05.228Z","isFirstParty":false,"canonicalSlug":"stm32-timer-and-pwm-calculator-fb2fc3df"}