CC2538是否支持ZLL ?
@TIers
1) 请问下CC2538是否支持ZLL ?
2)采用SmartRF06开发套件,配置后并未看到LED1渐变效果(代码如下)
---------------------------------------------------------------------------------------------------------------------------------------------
main函数:
int delayIndex;
unsigned int pwmDutyCycle = 0x0000;
SysCtrlClockSet(false, false, SYS_CTRL_SYSdiv_32MHZ);
SysCtrlIOClockSet(SYS_CTRL_SYSdiv_32MHZ);
// HALTimer1 Init
SysCtrlPeripheralEnable(SYS_CTRL_PERIPH_GPT0);
TimerConfigure(GPTIMER0_BASE, GPTIMER_CFG_SPLIT_PAIR | GPTIMER_CFG_A_PWM | GPTIMER_CFG_B_PWM );
TimerLoadSet(GPTIMER0_BASE, GPTIMER_A, SysCtrlClockGet() / 38000);
TimerControlLevel(GPTIMER0_BASE, GPTIMER_A, false);
TimerEnable(GPTIMER0_BASE, GPTIMER_A);
// PWM PINS Init
IOCPinConfigPeriphOutput(GPIO_C_BASE, GPIO_PIN_0,IOC_MUX_OUT_SEL_GPT0_ICP1);
GPIOPinTypeTimer(GPIO_C_BASE, GPIO_PIN_0);
IOCPadConfigSet(GPIO_C_BASE, GPIO_PIN_0, IOC_OVERRIDE_OE);
GPIOPinTypeGPIOOutput(GPIO_A_BASE, GPIO_PIN_0);
IntMasterEnable();
while(1)
{
// delay
for (delayIndex = 0; delayIndex < 100000; delayIndex++);
pwmDutyCycle += 0x0F;
pwmDutyCycle &= 0xFFFF;
// set value
TimerMatchSet(GPTIMER0_BASE, GPTIMER_A, pwmDutyCycle);
}
---------------------------------------------------------------------------------------------------------------------------------------------
Regards
ZLL的profile暂不支持CC2538的平台,需要移植。或者用ZHA也能实现LED的控制
@Viki Shi
请问以上CC2538开发板驱动PWM代码是否有问题呢?
目前LED1并未出现渐变(预期结果)
Thanks
你用的哪个开发板?
官网的例程是没问题的。
@dirtwillfly
1) 使用的是CC2538 SmartRF06开发板
2) 官网例程没有PWM相关的内容
BR