| 数据搜索系统,热门电子元器件搜索 |
|
EC3 数据表(PDF) 13 Page - Silicon Laboratories |
|
|
|||||||||||||||||||||||||||||
EC3 数据表(HTML) 13 Page - Silicon Laboratories |
|
13 / 20 page ![]() Si4010-DK Rev. 0.1 13 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 0 #else #define gLedOnValue_c 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. |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |