This invention relates to tools which may be used by those who wish to ascertain or test the functioning of a digital microcontroller such as application developers, product developers, testers and the like.
It is common for the manufacturers of microcontroller unit integrated circuits (“MCU chips”) to provide a software development kit which allows those purchasing the chips to develop software applications which utilise the chip. These would normally comprise peripheral components such as a power supply, user interface etc which can simulate an environment in which the chip would be employed in a product. An important aspect of developing an application for an MCU to be used in a product, particularly one which is to be battery-powered, is to seek to optimise the use of power. Thus one of the things that a development kit is used for is to measure the current consumption of the chip during various modes of operation.
It is also common to provide MCU chips with a debugger function in which extensive operational information is provided by the chip via a dedicated pin which can be connected to a compatible debugger tool. Some manufacturers have integrated such a debugger tool with a development kit.
However the Applicant would like to enhance the ease and reliability with which developers can explore and test the functions of MCU chips and when viewed from a first aspect the invention provides a device for analyzing the behaviour of a microcontroller, the device comprising:
Thus it will be seen by those skilled in the art that in accordance with the invention a tool is provided which, in at least its preferred embodiments, allows a user to analyze the behaviour of an MCU chip using standard instruments without the user needing to know or remember the detailed configuration, particularly the pin layout, of the MCU nor indeed that of the instrument(s).
The analyzer may be selected from the group comprising: logic analyzers, oscilloscopes, spectrum analyzers, current measurement devices, pattern and bus decoders and pattern and bus analyzers. The generator may be selected from the group comprising signal generators and pattern generators. These groups are to be considered non-limiting and any other analyzers or generators could be used. The apparatus of the invention may comprise one or more instruments. Where more than one is provided they may comprise at least one generator and at least one analyzer but this is not essential.
The instruments exemplified above tend to be standard instruments which can be used for analysis of a variety of MCU chips. However by contrast with the prior art where it would be necessary for the user to be aware of the detailed operation of the instrument and the pin layout of the MCU chip in order to ensure proper connection for a given operation to be carried out, in accordance with the invention the connections between then can be handled by the interconnection module. Even in circumstances where the user is familiar with the MCU pin layout and the configurations of the instrument probes, embodiments of the invention allow experimental set-ups to be implemented more quickly and with less risk of making a mistake.
The capabilities and connections of the microcontroller integrated circuit could be determined by receiving a file containing suitable configuration data. Additionally or alternatively some or all of the capabilities and connections could be determined by the device itself. For example the device may comprise software arranged to interrogate the microcontroller integrated circuit to find out how the resources inside it are configured, and/or at which input/output addresses the resources are mapped. This allows the resources to be presented to a user with options as to how the resources are connected to the analyzer/generator.
The microcontroller integrated circuit could be provided as an integral part of the device or could be removable. Where it is removable this could allow the device to be used with other MCU chips. It will be appreciated therefore that when viewed from a second aspect the invention provides a device for analyzing the behaviour of a microcontroller, the device being configured to receive a microcontroller integrated circuit, wherein the device comprises:
The instrument need not be connected just to one microcontroller integrated circuit. it could be connected to a plurality thereof—e.g. via a multiplexing arrangement such as a time-multiplexing arrangement. This may allow for more efficient utilisation of a given instrument. It may also allow for comparative tests between MCU chips which are similar or nominally identical.
In a set of embodiments the interconnection module comprises a field-programmable gate array (FPGA).
The device may comprise a user interface to allow a user located at the device to operate the software locally. However this is not essential. It is also envisaged that a remote user could operate the software via a suitable data network link such that it is not necessary for a developer to have physical possession of the MCU chip. This also facilitates collaborative working.
As well as configuring the interconnections between the microcontroller integrated circuit and the instrument the device may also be arranged to configure the operation of the instrument or one or more of the instruments. Thus, for example, where a particular operation mode or resources have been determined for the microcontroller integrated circuit, the instrument may be connected suitably to probe that resource and may also be configured suitably for such an operation.
Configuration of the instrument(s) may be carried out automatically based on the capabilities of the microcontroller integrated circuit. For example where the microcontroller integrated circuit's serial peripheral interface (SPI) is connected to an SPI pattern generator, the SPI pattern generator may be configured automatically with the correct data rate and operation mode for this.
In a set of embodiments the device is arranged to store data relating to settings of the interconnection module and/or the instrument in order that these can be reused at a later date or on another device etc.
When viewed from third aspect the invention provides a computer software product, which may or may not be provided on a carrier, the software being configured when run on a suitable data processor to control an interconnection module having configurable interconnections between a microcontroller integrated circuit and at least one instrument selected from the group comprising analyzers and generators in order to determine said interconnections based on a function selected by a user and determined capabilities and connections of the microcontroller integrated circuit.
An embodiment of the invention will now be described, by way of example only, with reference to the accompanying drawings in which:
On the software side 6 an overall software application 16 is provided which communicates with the control unit 10, analyzer 12 and generator 14 by means of respective application peripheral interfaces 18, 20, 22.
The hardware components are shown in a little more detail in
The power to the MCU 2 is provided by the FPGA 24 by means of a current shunt monitor 28 which allows the current drawn by the MCU 2 at any given moment to be measured. The FPGA 24 and the current shunt monitor 28 together comprise the selector 8 of
As previously described the MCU 2 is also connected to the control unit 10 in order for its operation to be controlled. In one exemplary embodiment the control unit 10 is provided by a J-Link emulator tool available from Segger Microcontroller GmbH & Co. KG in Hilden, Germany. The control unit also provides control of the FPGA 24.
In this particular detailed example the generator is exemplified as a signal and pattern generator 30, for example the Cypress EZ-USB FX3, which provides outputs 32 on a number of channels to the FPGA 24. The analyzer exemplified here is a logic analayzer 34, which can also be provided by the Cypress EZ-USB FX3 and which has a number of input channels 36 connected to the FPGA 24.
The signal and pattern generator 30, the logic analyzer 34 and the control unit 10 are connected to a USB hub 38 which provides a common connection to the application software 16 operating the device.
In use the software application 16 detects what sort of microcontroller is present in the device (e.g. say nRF51822) by accessing the MCU 2 via the control unit 10. This information may be displayed on a user interface provided by the software 16 as is illustrated by the “nRF51822 detected” in the box in the lower half of the screen-shot shown in
When the user has specified such a connection the software application 16 then configures the FPGA 24 appropriately to connect these resources to the correct input/outputs 26 on the MCU 2 according to the user's preference. This infrastructure enables the software application to fully abstract away the probe interconnect details between the analyzer 34 and the generator 30, and how these are connected to the MCU 2 without having to expose any of them to the user.
The software application 16 can then instead provide a very simple interface to the user as shown in
The advantages provided by the embodiment described above can be appreciated by comparing it with a typical scenario for setting up a workbench in the prior art. There it would be necessary manually to connect probe number X on the generator to probe number Y on the analyzer and then connect this to pin number Z on the MCU. The user would then have to set up the generator and the analyzer to match the settings of the resource that is being probed on the MCU, and ensure that the particular resource on the MCU is running correctly and connected to the correct pin and probe etc.
By contrast in accordance with the embodiment described above such a workbench setup is considerably simplified since the software application knows how the different components in the device are interconnected and configured. Analyzer and generator probe interconnections with the MCU can be set up automatically based on information extracted from the MCU and from information provided by the user via the software application. Analyzers and generators can also be configured automatically based on the same information.
Since the embodiment described does not require any interconnections to be handled manually, and since it is controlled by software, several advantages are gained compared to using a traditional workbench setup. First errors are less likely to be introduced. Second less work is required to set up new workbenches. Moreover once completed, the work carried out in setting up can be re-used by saving a setup's configuration in a configuration file and reapplying it later. This also means that a setup configuration file can be used to analyze the setup without having access to the hardware. Furthermore a setup can be connected to a virtual portal and accessed by a remote agent; and one instrument (generator or analyzer) can be employed in several places at the same time using time multiplexing is possible.
It will be appreciated by those skilled in the art that the embodiment described above is merely exemplary and that many details may be changed within the scope of the invention. For example additional or different instruments may be employed and of course it may be used with different microcontrollers.
Number | Date | Country | Kind |
---|---|---|---|
1300366.0 | Jan 2013 | GB | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2013/076854 | 12/17/2013 | WO | 00 |