Today's Data Acquisition Applications require separate ICs for input, processing, and output. With the new LPC4370, designers have a complete data acquisition solution on a single chip. With the release of NXP’s new LPC4370 Cortex-M4F microcontroller, we wanted to provide engineers with the tools necessary to evaluate its high-performance signal processing capabilities (up to 204 MHz) and its host of advanced features and peripherals including the 12-bit ADC at 80 Msps with up to six channels.
The result is a new product from Embedded Artists, named LabTool. LabTool is as an add-on board to NXP’s LPC-Link 2 debugger and demoboard platform. The LabTool includes a hardware daughter board and software running on the PC that enables the Link2 to be used as a logic analyzer, oscilloscope, and signal generator. It is designed around NXP’s new LPC4370 microcontroller, and the hardware can serve as a development platform for this MCU.
Follow the URLs in the table to find more information on the product and its key components.
The LPC4370, ARM Cortex-M4F based microcontrollers, are complete data acquisition solutions on a single chip. The LPC4370 provide the fast digital and analog inputs, the high performance processing capabilities, and the hi-speed output needed for data acquisition applications. Running up to 204MHz, the ARM Cortex-M4F of the LPC4370 is the industry’s fastest Cortex-M microcontroller. The Cortex-M4F is a next generation 32-bit core that offers system enhancements such as low power consumption, enhanced debug features, and a high level of support block integration.
Download the LPC4370 documentation:
LPC-Link 2 is an extensible, stand-alone debug probe that can be configured to support various development tools and IDEs using a variety of different downloadable firmware images. It can also be used as an evaluation board in its own right for the NXP LPC4370 triple core MCU. And through the use of an add-on board from Embedded Artists, it can be used as an oscilloscope or logic analyzer!
For more information on the Link 2, view our NXP.com page.
LabTool can be purchased as a kit that includes the Link2 main board plus the add-on board, or the two can be purchased separately. A connector with 26 probe wires is included, and is the only accessory required for using the tool. The probes feature a 2.54mm pigtail end, for easily connecting to headers and jumpers on a target platform. A set of compatible microgrippers may also be useful, but must be purchased separately.
Purchase LabTool, download documentation and the GUI at Embedded Artists product page.
LabTool also available for purchase at:
|Watch the video here.|
The LabTool consists of both a hardware platform and a software GUI, which combine together in providing the following set of features that are commonly used by electronic designers during bench debugging. A standard 5.0V supply from your high-speed USB2.0 connector provides the power needed to operate the board, as well as the high-speed communication channel for the data stream.
10 channel logic analyzer supporting 100MHz (2ch), 80Mhz (4ch), 50MHz (8ch), 20MHz (10ch)
Selectable edge-sensitive and level-sensitive triggers give you flexibility in how the signal is displayed.
11 channel digital signal generator up to 80Mhz, at 3.3 volts logic level.
Included with the digital interface are three protocol analyzers. You can monitor SPI, I2C and UART with a built-in interpreter that shows the timing of clock and data transfers in the GUI.
Demonstration signals are provided already on the board, by means of an LPC812 microcontroller. This devices generates heartbeat PWM, four digital counters (at 750KHz, 1.5MHz, 3.0Mhz and 6.0MHz), plus SPI, I2C and UART data streams. These signals can be used for quickly verifying the tools is up and running, and provides reference signals for comparing to your own design when measured by the LabTool.
2 channel oscilloscope sampling at 80Msps (1ch), 40MHz (2ch), with 6MHz bandwidth rating. The voltage range that can be sampled is a very wide range at +/- 25 volts. Input impedance is 1Mohm.
2 channel analog output generation at 40KHz bandwidth, at +/- 5 volts. Three built-in waveform generators support sine, square and triangle waveforms.
LabTool comes with a feature rich software interfaced developed by Embedded Artists. The GUI gives users the capability to manage the digital and analog channels through:
The GUI is developed using Qt framework, and can be provided as open source.
Source code for the firmware operating on the LPC4370 is also planned to be released for use among the community of NXP users. Developers are encouraged to use this firmware as a starting point for creating exciting new applications based on LPC4370!
A comprehensive user guide for the LabTool is available from Embedded Artists at the link given above.
Refer to the user guide and notes on Embedded Artists web site for the most recent instructions. Here are some tips that have helped our testers and expert industry users to get started smoothly.
Correct orientation is required. Be sure the expansion headers on the Link2 are aligned properly to the connectors on the LabTool add-on board. The USB port is located at the end opposite from the BNC connectors.
We asked leading experts in the embedded community to test the LPC4370 and LabTool, create some test code, and let us know what they thought of the whole process. Below are their evaluations:
Kevin Townsend has been working with LPC microcontrollers since the ARM7 LPC2000 products were released. He specializes in ARM Cortex-M0/M3/M4 design and development with interest in low power and wireless sensors. He is active in the open source HW world as Lead Engineer at Adafruit Industries. Kevin tested the LPC4370 and wrote a review on his blog site, www.microbuilder.eu. To read his insightful commentary follow this link.
Bob Boys is a Product Manager for Keil MDK and ARM DS-5 tools at ARM with multiple years of experience in the industry. He holds a Masters in Information Sciences and has worked with a variety of hardware and software platforms around the ARM Cortex family of products. Bob decided to test out the oscilliscope feature of the LabTool. See his review below.
Dirceu Rodriguez, Jr. is a computer engineer with a master's degree in electrical engineering. As an independent consultant, he tests new products with particular interest in the areas of wireless sensor networks, ARM processors, DSP, motor control, and medical applications. (Review coming soon)
Massimo Manca has 20+ years of experience in the industry. He has worked on a variety of applications with more than 30 different microcontroller families. Massimo gave the LabTool and Link2 a thorough testing on all parts. Initial comments are provided below, with an additional review coming soon.
NXP Application Engineers have tested the LPC4370 and LabTool for themselves. Their feedback and use cases are shown below.
Read his insightful commentary here.
I tested the scope part as this is what I am most interested in. LabTool in this respect worked quite well compared to other USB scopes I have used that cost mush more. I tested it on a two node CAN network and the SWO Serial Wire Output: both on a Keil MCB1700 (LPC1768) board.
I liked these things:
1) Easy to change from neg/pos slope or no trigger.
2) Changing the trigger point was very easy although I liked using the no trigger setting better to initially get a waveform going.
3) Determining the timing was easy and surprisingly accurate. At first I was getting very bad frequencies but after I calibrated the LabTool per the instruction it was fine.
4) Setting the cursors was easy – but see point 5 below.
5) The waveform faithfulness compared to my HP 100 mHZ scope was quite good.
6) Installing the software was easy although I had some initial trouble with the USB drivers – it could detect it and under device the labtool Device was grayed out. I had to uninstall the previous LPC-Link 2 USB drivers (which had worked OK for me) – it showed it was not installed correctly or something like that - it had a small yellow icon in Device manager. Now it works fine.
7) Single shot and continuous collection works easier than on my HP.
I thought these could be improved:
1) The scope selection is called Analog. I was confused – why not just label it scope ?
2) I had some difficulty getting a waveform displayed sometimes – I had to fiddle with it.
3) I was not able to erase a waveform so sometimes I didn’t know if I had a new one or nothing or ???? Making this part easier to use might be worth it.
4) I could not make the waveform bigger or shift it up or down (position).
5) When I clicked on a cursor icon to bring it up into the screen – the waveform shifted and it looked like (to me anyway) to have disappeared. It was there – It took me a while to figure this out.
6) CAN is a differential signal but it seemed to work. A differential input would be nice. So would a CAN Analyzer.
7) I had a hard time getting the “DC” to work – “AC” was always better and easier.
8) The ability to change the waveform colour might be a good idea.
Following are the results of two tests.
CAN on one channel:
1) 500 kHz is correct !
2) The waveform (at 80 MHz) is good – the overshoots are not visible on the HP but I didn’t adjust the tiny capacitor screws on the LabTool. There are more of the resolution errors shown on the rise and fall edge than my HP – but HP still has some. Not a big deal.
Here is the CAN frame using two channels: Even though I had to reduce the sampling freq to 40 mHz – it still looks good.
The ability to move the waveforms vertically (and maybe a polarity switch) would be nice.
Very often customers must measure the frequency on the SWO pin if they can’t get the Serial Wire Viewer (SWV) working and they do not know what their CPU clock is.
A scope makes this easy and – LabTool did very good – I think sometimes the SWO pin can go up to 1 mHz and more – but this example at 1.25 worked fine.
1.25MHz as shown here is correct !
I compared all these waveforms to my HP and LabTool did quite well.
After some hours of test my feeling is that the digital part works quite well, the I2C, SPI and UART interpreters are useful and well designed. Should be very interesting to have also a CAN interpreter and a 1-Wire interpreter.
Another thing should be useful is to define the priority of the triggers on the digital signals. I mean that should be useful for instance to define the trigger on the UART - D0 line with the highest priority so the other signals will be captured only it is already captured on its trigger front.
I should need to go back to my lab to test better the analog inputs. My feeling is that the signal is not perfect due to some interference by my laptop. Should be interesting to connect a USB isolator between the boards and the PC to see what changes.
The next step will be to test the board freely always using the demo signals without following the example list. I will provide update with the results.
Lately I’ve been working with one of NXP’s solution kits. This kit includes an LPC812 Xpresso board and a daughterboard with the SEN300 sensor. The sensor measures temperature, humidity and light. It interfaces the microcontroller through a 4-wire SPI bus (SCK, MISO, MOSI, CS) running at 300kHz.
Considering that an end user of this solution kit may want to add another node on the SPI bus, it should be necessary to increase the communication rate from 300kHz to a higher speed, and allow for transfers to/from the additional device using the same SPI peripheral. Types of SPI devices that could be considered are a simple LCD for displaying the sensor readings, or an EEPROM for data logging.
After I selected new dividers for the SPI master clock to increase the clock rate to 3MHz, the communication interface broke down. I setup the LabTool digital interfaces D0 to D3 and configured the SPI protocol analyzer to use these for the corresponding SPI signals. Following are some screen shots and the conclusion of the problem.
Normally the communication seemed to be occuring just fine. I noticed that the chip select signal (Digital 3) was active low outside the boundaries of the waveform view in the LabTool GUI. From time to time, actually more often than not, the SPI analyzer could not interpret the transfer data, and showed “Frame Error” was occurring. By changing the trigger to the rising edge of the chip select, I could see this occurring more frequently. At that time, the chip select signal was momentarily toggling high/idle and then low/active in the middle of a data transfer.
I began stepping through the code to find the routines that set and cleared the state of the chip select (a simple digital output port). I found that the routine that handles the SPI transmit/receive buffers could get out of sync with the function controlling the chip select output, and cause message transfers to overlap. By adding some simple logic to ensure the chip select was not idled before the SPI buffers were serviced, the problem went away. Here is a screen shot of a good SPI transfer at the higher SCK rate.
Using LabTool and the SPI protocol analyzer feature, I was able to identify the problem in the communication interface, and then use a debugger to finish checking the root cause.
Motor control applications often use the feedback from a rotary encoder in a closed loop control system. The LPC4370 microcontroller includes a QEI peripheral (Quadrature Encoder Interface) that decodes these signals directly. By monitoring both the number of pulses and the relative phase of the two signals, you can track the position, direction of rotation, and velocity. In this example, we’ve measured the QEI signal sequence with LabTool. The type of Rotary Encoder used in this project is SXA-4EG05E1024BM with 1024 pulses per round.
The encoder ouputs A,B and Zero terms. So we connect the encoder with LabTool through DIO0~DIO2. LabTool should also be connected with the Encoder’s gound pin to ensure they share a common gound. Use one of the available grounding probes on the 26-pos connector (e.g. probe #4), to make this connection.
DIO0 -> A Term
DIO1-> B Term
Open the LabTool application program on your PC, and connect the LabTool using the USB connection.
The GUI will show that LabTool is connected when the text "LabTool Device" changes from red to black text. Now, you can click the “Add Signal” button and choose D0, D1 & D2 digital signals as below picture shows.
We’ll rotate the Encoder by hand, so we set the “Sample Rate” as 100kHz.
Set the D2 Digital capture on rising edge.
Click the “Capture->Continuous” or button to start sampling the digital input channels. When we rotate the Encoder, the signal capture below is displayed with LabTool.
We can move the triggers C1&C2, C3&C4 to measure the signal’s frequency and duty cycle.
If we want to measure a whole cycle from the Encoder, we can set the “Sample Rate” as 50Mhz, then rotate the Encoder and capture the entire waveform shown next.
LabTool's logic analyzer feature is very powerful and useful for motor control applications measurng the feedback from a rotary encoder.
One of our customers is designing-in the NXP Microcontroller in a SAS (Serially Attached SCSI) Server system. This controller is used to manage the overall backplane activities and interfaces to the host SAS Controller on SMBUS/I2C Bus. The customer was facing major issue of I2C Bus hanging. As such, it was difficult to diagnose the issue as there were multiple slave devices on the bus. Coincidently, we had this LabTool lying around and I thought of using it in debugging the issue. Initially, I isolated this controller from the I2C bus and hooked it up to another I2C Master. While monitoring the bus activity on the LabTool’s I2C Analyzer, apparently the overall communication was just fine as shown below.
On a closer look, I noticed that the clock (SCL) was getting stretched a bit at times, but nothing unusual. I then connected this controller back in the system and monitored the I2C bus activity on I2C Analyzer again. And no surprise, the bus hanging problem was getting reproduced as seen in the capture below. After the clock stretching interval, the clock (D2=SCL) line was holding it’s status as low and data (D1=SDA) was high. It was clear that the problem appears only when there are multiple slaves connected to a SMBUS/I2C Bus Master.
It gave me some direction to think and investigate more on similar lines. Gone through the details of SMBUS/I2C peripheral on SAS Controller and as usual googled for I2C issues with multiple slaves. Finally got a clue while going through the minute details of SMBus specifications. Though it’s normal to use I2C slaves/devices with SMBus master and vice a versa, there are subtle differences in the specifications. The most vital difference is the Timeout and (as a consequence of timeout) minimum clock speed. There’s no time out in I2C specifications, any device can stretch the Clock as long as it wants. While the SMBus clearly specifies the time out of 35msec, where slave devices resets their interfaces whenever Clock goes low for longer than the timeout. Use of such timeout also dictates a minimum speed for the clock, because it can never go static. Thus, the SMBus has a minimum-clock-speed specification of 10kHz.
To comply with the SMBus specifications Slave devices should have this time out implemented. I then added a small piece of code to generate this timeout using one of the available timers and that resolved the issue. Thanks to the LabTool!
There are three key features of LabTool that are useful to any developer:
Here is a comparison versus another USB-hosted signal analyzer. We will call it "AnalyzerB" in this article.
Regarding AnalyzerB, the cheaper option is the product SX at $169.0 USD, it has only 8 digital input/output with a maximum sample rate of 24MHz. The most comparable product will be the AX product with a pricing of $795 USD with also 8 digital input/output with 2 analog oscilloscope inputs but you can capture maximum at 24Msps and only one analog input at any time. The AX product also can analyze CAN, PS/2, SM bus and 1-Wire communication. These options could be added easily to the PC software.
So, the pricing of $129.00 USD for the NXP LabTool is a very good pricing and with the source code available you won't have any limit to customize or improve the LabTool.
I did a zoom in the PWM signals in order to get a more detail measurement and I will compare these signals measurements with the AnalyzerB tool.
I had these measurements because the sample rate is at 10MHz and LabTool is using the upper channels. Now I did a measurement using AnalyzerB tool. It couldn’t read the 12MHz signal (channel 0); the sample rate is at 12MSPS. I had to increase to 24MSPS (MAX) in order to be able to measure the 12MHz signal. The frequency measurement in each signal was exactly 1.5MHz channel 3, 3MHz channel 2, 6MHz channel 1 and 12MHz channel 0 without any variation.
Now, using the LabTool I change the 4 PWM signals to channels 0 to 3 and increase the sample rate up to 100MHz. I had the following:
The frequency in the signals is:
The AnalyzerB tool didn’t show any variation in the frequency measurements. It might be because the LabTool has more precision. I went up to 100MHz sample rate and I had the same frequency measurements in each signal. Maybe the AnalyzerB is using some other method to implement an average or it might be over sampling to improve the measurement. I might need to have a third logic analyzer to see what tool is getting a right measurement.
I had some trouble using the LabTool GUI. For example, I didn't know that LabTool is connected at first since the "LabTool Device" indication was not highlighted. Also it was difficult to know how to choose the protocol analyzer, so that Combo Box could be improved. It is clear that the LabTool has more resolution when using the lowest channels. The AnalyzerB tool has only a maximum of 25MSMP for all combinations. So the LabTool has an advantage because it could be 100MHz sample rate in 2 digital channels.
I like the LabTool but it might be a good idea to include test clips for each of the signals because not all the time the target circuit will have pins to plug the actual test points. These test clips will give more functionally to the LabTool. Also, I would like to have more information about the actual LabTool system if it will be like a reference design for customer, like the source code for the LabTool software and also the firmware for the MCU.
The LabTool could be used for debugging without any issue; I think that the Start Guide should be updated with more detail information to improve the usability.