NOTICE: This website will be shut down in the near future. Product content has moved to nxp.com. Forum content and FAQs have been moved to community.nxp.com. We encourage you to create a user account on nxp.com to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.

 

Mixed-Signal Logic Analyzer & Oscilloscope (Lab Tool) Solution

NXP_Support's picture

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.

LPC4370 and LabTool Key Components

Follow the URLs in the table to find more information on the product and its key components.

LPC4370

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:

LPC4370 BGA256 Product Information Page

LPC4370 BGA100 Product Information Page

LPC4370 User Manual and Data Sheet

LPC4300 Series Leaflet

 

See video

LPC-Link2

 

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 LPCware page.

 


LabTool

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.

LabTool Features

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.

Digital Channels

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.

Analog Channels

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.

GUI

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:

-          Dialogs for selecting digital and analog inputs channels

-          One-shot and continuous sampling

-          Sorting and moving of signals

-          Applying application-specific signal names

-          Saving settings in a project file

-          Exporting collected data to .csv formatted files

-          Appling SPI, I2C or UART protocol analyzers to selected channels

-          Using four cursors to measure and interpret waveforms


 

Open Source Environment

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!

 


 

Getting Started

A comprehensive user guide for the LabTool is available from Embedded Artists at the link given above.

Tips for getting started:

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.

-          Install the GUI software first.  USB drivers (needed at step #2 below) are copied to the installation folder during this step.

-          Attach the LabTool add-on board to the Link2 (see image below for proper orientation).

-          Driver installation may take several minutes, and is accomplished in two steps. 

1.       When the hardware is first connected to a USB port, the driver for the Link2 must be installed.  This driver is included with the LPC-Link2 Configuration Tool.  The device manager shows the hardware is enumerated as “LPC Device”.

2.       Once the Link2 driver is loaded, the next step allows the LabTool GUI to be started.  The first time the GUI runs, it will detect the LabTool hardware, and will load an additional driver.  This driver is located in a sub-folder from the location where the LabTool software package was installed.  The device manager shows the hardware is now enumerated as “NXP LabTool”

-          Once the GUI is running, check that “LabTool Device” is displayed in the section marked “Selected device” in the diagram above.

-          The probe bundle has each wire function labeled on the silk screen of the PCB.  Check these carefully to find cable D0, and connect it to the demonstration signal  labeled “PWM_LED” on the header at the bottom right corner of the board.  In the GUI, choose “Add Signal” and select D0 as an input channel; press OK.  Set a falling edge trigger and a sample rate of 2MHz.  Choose continuous sampling, and view the results in the waveform view.  It’s that simple!

Correct Orientation

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.

 

 


Industry Experts and NXP Testers

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:

Industry Experts

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 Testers

NXP Application Engineers have tested the LPC4370 and LabTool for themselves.  Their feedback and use cases are shown below.

Using the SPI Protocol Analyzer

Using LabTool to evaluate Rotary Encoder and QEI peripheral

Investigating I2C/SMBus issue using LabTool

Comparing the LabTool to a commercially available signal analyzer


Evaluations and Reports

Kevin Townsend hosts a blog on his microbuilder.eu site.

Read his insightful commentary here.

 


 

 

Bob Boys from ARM, Ltd. wrote:

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.


SWO:
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.

 


 

 

Massimo Manca wrote:

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.

 


 

Using the SPI Protocol Analyzer

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.


 

Using LabTool to evaluate Rotary Encoder and QEI peripheral

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

DIO2-> Zero


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.