Si4010-DK
The intensity setting can be changed any time, even when the GPIO_LED = 1.
This is basically how the LED control operates. This approach will work when the part status is finalized as the Run
device, since for that program level the C2 interface is turned off after the boot-by-boot routine.
However, when the code above is used for a device in the Factory or User programming state, then the GPIO4 will
stop working after the first LED blink. The LED must be seen to be turned on and off by the application (to blink) to
experience this problem.
2.8.2. Solution 1: Living with the Limitation
The simplest solution is to know about the issue and decide to live with it. After the first LED blink, the GPI04 will
not work. In this scenario, the user may decide to test the GPI04 only when the part is fully programmed as the Run
part.
2.8.3. Solution 2: Controlled Compilation
The user may use a #define C statement to define a LED "on" value. For button press debugging purposes when
the LED can be off the code is compiled with value set as 0, so the LED will never light up and the GPIO4 will
always function. For debugging the LED, and for final application compilation for the Run state of the device, the
user will compile the application with the LED "on" value set to 1.
For example:
#ifdef DEBUG
#define gLedOnValue_c
#else
#define gLedOnValue_c
0
1
#endif
/* Clear the GPIO_LED off after reset .. reset will set this bit! */
GPIO_LED = 0;
/* Set LED intensity .. acceptable values are 0 (off) or 1, 2, and 3 */
vSys_LedIntensity( 3 );
/ * Turn the LED on at currently set intensity */
GPIO_LED = gLedOnValue_c;
/* Turn the LED off, keep the intensity setting */
GPIO_LED = 0;
One advantage of this solution is that the code size is identical in both cases, Debug or Run. Cycling the power to
the part in this context means either physical removal of the power to the device or calling the vSys_Shutdown()
function from within the application, which achieves the same result.
2.8.4. Solution 3: Dynamic C2 Disable (Recommended)
The GPI04 issue manifests itself when the LED is actually being turned on and off from the application. The LED
physically blinks and is not blocked from being lit up by an application being connected to the IDE debug chain, and
the C2 interface is active and enabled.
Rev. 0.1
13
相关PDF资料
4021-CW 4021 ELARA MOON MODULE WHT
404R5KL1.0 POSITION SENSOR LIN 5K OHM
4140-00 EVAL KIT FOR 4140
4141-00 EVAL KIT FOR 4141
420680260-3 CABLE OSD 6" 150MM
420680840-3 CABLE 4-WAY JST AUX POWER
4210-00 KIT EVAL FOR 4210 RF SWITCH
4230-00 KIT EVAL FOR 4230 RF SWITCH
相关代理商/技术参数
4010-KFOBDEV-868 功能描述:射频开发工具 Dev Kit with Si4355 Receiver (868MHz) RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
4010-KFOBDEV-915 功能描述:射频开发工具 Dev Kit with Si4355 Receiver (915MHz) RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
40-10-LF 制造商:Birtcher Products 功能描述:Lock/Flat Washers 制造商:Birtcher Products 功能描述:CARD GUIDE WEDGE-LOK ALUMINIUM ALLOY 制造商:BIRTCHER 功能描述:CARD GUIDE, WEDGE-LOK, ALUMINIUM ALLOY
40-10-LF-LN 制造商:Birtcher Products 功能描述:Lock/Flat Washers and Lock Nut 制造商:BIRTCHER 功能描述:
4010P 功能描述:CABLE MOTORCYCLE HOOKUP RING LUG RoHS:否 类别:电池产品 >> 配件 系列:- 标准包装:1 系列:- 附件类型:触头清洁剂 适用于相关产品:电池 其它名称:ST1026
4010R-A-.188-23 制造商:Accurate Screw Machine 功能描述:
4010R-A-.250-23 制造商:Accurate Screw Machine 功能描述:
4010XL1PQ208C 制造商: 功能描述: 制造商:undefined 功能描述: