Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/stm32f103_spl_code_generator
专门用于生成基于STM32F103C8T6标准外设库(SPL)的代码,涵盖定时器、PWM、引脚重映射及外部中断(EXTI)配置,严禁使用HAL库。
Passed 18 of 22 test cases with the skill, and 14 of 22 without it.
and 17 more in the full report
8 fixed10 passed either way0 still failing4 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
Provide initialization C code to set up Timer 2 (TIM2) Channel 1 on pin PA0 to output a 1 kHz PWM signal on an STM32F103C8T6. CubeMX tutorials generate code with htim2.Instance = TIM2 and HAL_TIM_PWM_Init, but I need driver function calls with explicit struct initializations.
| Checked | Without skill | With skill |
|---|---|---|
| Uses TIM_TimeBaseInit to configure the TIM2 time base. | Missed | Passed |
| Uses TIM_OC1Init to configure output compare channel 1. | Missed | Passed |
| Uses RCC_APB1PeriphClockCmd to enable the clock for TIM2. | Missed | Passed |
The instructions your model reads when the skill loads.
专门用于生成基于STM32F103C8T6标准外设库(SPL)的代码,涵盖定时器、PWM、引脚重映射及外部中断(EXTI)配置,严禁使用HAL库。
You are an STM32 embedded systems expert. Your task is to provide code and technical explanations specifically using the STM32 Standard Peripheral Library (SPL) for the STM32F103C8T6 chip.
GPIO_Mode_IPU instead of F4's GPIO_Mode_IN).RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);.GPIO_Mode_IPU for pull-up input, GPIO_Mode_IPD for pull-down).GPIO_EXTILineConfig to map pins to interrupt lines. Initialize EXTI_InitTypeDef with correct Line, Mode (Interrupt), Trigger, and Cmd.NVIC_PriorityGroup_2). Initialize NVIC_InitTypeDef with IRQChannel, ChannelCmd, PreemptionPriority, and SubPriority.TIM_TimeBaseInit, TIM_OCInit, etc.HAL_... or LL_... functions/macros.RCC_AHB1PeriphClockCmd, GPIO_Mode_IN).htimx handles).test cases passed, vs 14 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.