AN134 describes the Multiple-Device JTAG Chain configuration in the legacy Silicon Labs IDE.
Here is an example on how to use the Flash Utility command-line tool for Multi-Device JTAG programming using Silicon Labs USB Debug Adapter (UDA). For more details on these commands, Please refer to the readme.txt included in the command-line tool.
The device ID for CPT007B is 0x25 and the derivative ID is 0x40. The device ID for CPT112S is 0x25 and the derivative ID is 0x50.
You could get this device information with the inspect command device8051.exe tool like below. The commander tool was located in folder like C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\inspect_c8051
I have used the capsense library, the slider was composed of several sensors. do you have any suggestion how to convert the sensor data to slider position?
Answer
You could refer to our example CapsenseCircleSlider for EFM8SB1 device. You could get the example code in folder like below for default installation:
The example use centroid algorithm to interpolate the 3 nodes data to get the slider position. The bin for the 3 sensors was [20, 40, 60]. the weight 40 was for the sensor with max value captured.
Let us assume the sensor value for the 3 sensors was x, y and z. Then
centroid = (x * 20 + y * 40 + z * 60) / (x + y + z)
This would give a result with range [30 50].
The max value 50 was getten when y equals z.
The min result 30 was getten when y equals x.
You should choose suitable bin parameter based on your sensor layout and target slider range.
The EFM8LB1_TempSensor_WithCompensation example for EFM8LB1 use the internal 1.65V reference to measure the temperature, could I change the 1.65V internal reference to 2.4V internal pin reference (or other) as ADC reference voltage?
If the answer is yes, what factors I should take into consideration when I change the internal reference voltage for the ADC.
Answer
Basically the answer is yes because the temperature sensor would convert the die temperature to a voltage, any voltage reference for the ADC could be used to measure the voltage converted by the temperature sensor.
In the example (refer to file EFM8LB1_TempSensor_WithCompensation.c) we use below formula to convert ADC code to die temperature: temp_scaled = ((ADC_AVG - tempsensor_0c)*SCALE) / constant;
Where:
constant equals 28.
tempsensor_0c was a one-point calibration value read from flash.
The key point here is that tempsensor_0c (read from flash) and constant 28 was gotten when ADC was configured to use 1.65V voltage reference and 14-bit mode.
In fact the constant 28 was gotten with below idea: For 14 bit ADC, resolution is 2^14= 16384 temperature slope = 2.8mV/degC (Table 4.11 of datasheet) 1.65V full range = 1650mV Then 2^14*2.82/1650=28.001745 This mean when ADC was configured to use 1.65V voltage reference and 14-bit mode, 1 degC temperature change will cause 28 (decimal) ADC code change.
The tempsensor_0c that read from flash was also gotten when ADC was configured to use 1.65V voltage reference and 14-bit mode. This means that under controlled die temperature (0 degC), use 1.65V internal reference and 14-bit mode, we get a ADC output code as tempsensor_0c.
So if you want to change the ADC reference voltage or bit mode, you should either:
1. scale the ADC code (get with new reference voltage and bit mode) to a code that you would get with 1.65V and 14-mode.
2. scale tempsensor_0c and constant 28 in the formula above to suit for the new voltage reference and bit mode.
Both should work fine.
Let me assume you are taking the option 2 and use 2.4V reference voltage (still 14-bit mode), then you could get:
I did not see VDD ramp up time requirement for some EFM8 device in the datasheet, do you made some change.
Could you summarize some changes for these new EFM8 devices?
Answer
The VDD ramp up time limitation was removed for EFM8UB1/EFM8LB/EFMBB1/EFMBB2 /EFMBB3/C8051F85x. But the delay time was prolonged. EFM8UB2/EFM8SB1/EFM8SB2 still need VDD ramp up to a specific level within specific time. You could see the detailed requirement in the datasheet.
The watchdog peripheral was also changed. EFM8UB1/EFM8LB/EFMBB1/EFMBB2 /EFMBB3/C8051F85x use a separate watchdog peripheral and the initial timeout period was prolonged. You may not encounter the issue listed in this KB for these devices.
For EFM8SB1/EFM8UB1/EFM8LB/EFMBB1/EFMBB2 /EFMBB3/C8051F85x device, DEVICEID/DERIVID was added as SFR register and firmware could access them. For old 8-bit MCU like EFM8UB2/EFM8SB2 these information could only be accessed by C2 interface.
UUID was also added for EFM8LB1/EFM8BB2/EFM8BB3/EFM8UB1 devices. The UUID resides in the read-only area of flash memory, which cannot be erased or written by the end application. The UUID can be read by firmware or through the debug interface at flash locations 0xFFC0-0xFFCF.
Does Simplicity Commander support EFM8 device programming? Does Silabs provide some command line tools for 8-bit MCU in Simplicity Studio installation package?
Answer
Currently the Simpliicity Commander only support programming 32-bit EFM32/EZR32/EFR32 device with SWD interface. It could not be used to program the 8-bit MCU with C2 or JTAG interfaces.
The standalone Simplicity Commander could be downloaded here.
Programming with flashefm8.exe tool:
To program the EFM8 device (with J-Link) you may try the command line tool flashefm8.exe that located in the folder like C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\efm8
Take the EFM8SB1 STK as example to program the on-board part you could use command:
To program the C8051Fxxx device or EFM8 (with UDA) you may try the command line tool flash8051.exe that was located in the folder like C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\c8051
Take the C8051F320-TB (has on-chip C2 debug interface) as example, for programming the on-board part you could use command:
Based on the datasheet, there are different options for pin-1 identifier, what part number should I order if I want a specific option.
Answer
You could get 2 options (irregular corner or irregular edge) in Figure 8.1 on page 50 of the datasheet as below:
The variability of the Pin-1 Identifier is a reality that the manufacturing flow of this product may come from multiple package vendors. Each of these vendors may implement slightly different Pin-1 Identifiers.
The part number could not distinguish this options. You may receive part with any option.
8-bit Knowledge Base
How to use Flash Utility Command-line Tool for Multi-Device JTAG Chain Programming
Programming the CPT112S and CPT007B
Question
Programming the CPT112S and CPT007B
Answer
The device ID for CPT007B is 0x25 and the derivative ID is 0x40. The device ID for CPT112S is 0x25 and the derivative ID is 0x50.
You could get this device information with the inspect command device8051.exe tool like below. The commander tool was located in folder like C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\inspect_c8051
C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\inspect_c8051\device8051.exe -slist
Then you could use the xPress configuration tool to generate the configuration hex file and flash8051.exe to program the CPT112S by below steps:
flash8051.exe -sn TS004A566A -tif c2 -upload cpt112s_a01_gm.hex -erasemode page
Convert several capsense nodes result to slider position
Use 2.4V reference to measure the temperature for EFM8LB1
Some changes made on new EFM8 devices
Programming 8-bit MCU with flashefm8.exe and flash8051.exe Tool
Question
Does Simplicity Commander support EFM8 device programming? Does Silabs provide some command line tools for 8-bit MCU in Simplicity Studio installation package?
Answer
Currently the Simpliicity Commander only support programming 32-bit EFM32/EZR32/EFR32 device with SWD interface. It could not be used to program the 8-bit MCU with C2 or JTAG interfaces.
The standalone Simplicity Commander could be downloaded here.
Programming with flashefm8.exe tool:
To program the EFM8 device (with J-Link) you may try the command line tool flashefm8.exe that located in the folder like C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\efm8
Take the EFM8SB1 STK as example to program the on-board part you could use command:
Programming with flash8051.exe tool:
To program the C8051Fxxx device or EFM8 (with UDA) you may try the command line tool flash8051.exe that was located in the folder like C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\c8051
Take the C8051F320-TB (has on-chip C2 debug interface) as example, for programming the on-board part you could use command:
Take the C8051F020-TB (has on-chip JTAG boundary scan and debug circuitry) as another example, try command:
Take the EFM8SB1 STK (has on-chip C2 debug interface) as another example, try command:
Usage information of the tools:
You could get Usage information with an option -? for these tools, take flashefm8.exe as example:
Pin-1 identifier options for EFM8SB1 QFN24 package