Hi Guys.
I working to finish my dimmer device I´m using the (Zigbee Z-Stack Home 1.2.2a.44539 Home Automation / SampleLight) as example.
Mr Y.K. told me, in another post here, to use a Z-Stack Lighting /SampleApp for example to change my code, mainly in PWM setup definitions over hal_board_cfg.h , I made some changes as him advised me. But during those changes I observed, during debugger in my c. file, that part of my code is not reached which is preventing to go a way to finish my hal_board_cfg definitios.
In my C. file has #if (defined HAL_BOARD_ZLIGHT) || (defined HAL_PWM) before important functions necessary to call another files to working PWM as I need.
>>>>> static void zclTTa0003_AdjustLightLevel( void )
#if (defined HAL_BOARD_ZLIGHT) || (defined HAL_PWM) >>>>>>>>>>>> this prevents it from reaching the next level
zclTTa0003_UpdateLampLevel(zclTTa0003_LevelCurrentLevel);
>>>>> void zclTTa0003_UpdateLampLevel( uint8 level )
uint16 gammaCorrectedLevel;
// gamma correct the level
gammaCorrectedLevel = (uint16) ( pow( ( (float)level / LEVEL_MAX ), (float)GAMMA_VALUE ) * (float)LEVEL_MAX);
halTimer1SetChannelDuty(RED_LED, (uint16)(((uint32)gammaCorrectedLevel*PWM_FULL_DUTY_CYCLE)/LEVEL_MAX) );
OBS. All those parameters used above I kept as default value.
I tried to setup HAL_PWM in a different option on compiler options (HAL_PWM, HAL_PWM=TRUE, HAL_PWM=1) and is not woring.
I tried also to find an specific setup definition that have correlation ship with HAL_PWM in Zstack user guide didnt have a success.
When I used HAL_PMW in different combination above the IAR compiler appear errors:
Error[e46]: Undefined external "HalTimer1Init::?relay" referred in zcl_TTa0003 ( C:\Texas Instruments\Z-Stack Home 1.2.2a.44539\Projects\zstack\HomeAutomation\
TEHA0003\CC2530DB\RouterEB\Obj\zcl_TTa0003.r51 )
Error[e46]: Undefined external "halTimer1SetChannelDuty::?relay" referred in zcl_TTa0003 ( C:\Texas Instruments\Z-Stack Home 1.2.2a.44539\Projects\zstack\
HomeAutomation\TEHA0003\CC2530DB\RouterEB\Obj\zcl_TTa0003.r51 )
Somebody can help me how to fix this initial issue. Please?
BR
Alex