© ikalogic
Products |
Accelerating development of embedded systems with logic analyzers
While logic analyzers may be originally known for parallel system debugging with wide data busses, the last decade has seen their usage shifting to serial applications, involving less signal lines, like I2C, SPI or UART.
This is a product release announcement by IKALOGIC S.A.S.. The issuer is solely responsible for its content.
In this article, we’re going to go through the process of embedded system development and see how logic analyzers can be used to speed up product development, and ultimately, time to market.
Breathing life into your electronics board
So that PCB just landed on your desk, with all components perfectly soldered. You’ve powered it up and checked all power supplies, and you even have a little green LED that says “All is fine!”. So far so good. Now you want to start writing some code for the embedded microcontroller and make sure all interfaces with sensors, memories and other peripheral components are operating correctly. This stage is quite critical, and can become very time consuming the moment you hit the first bug. Many parameters - sometime well hidden features of the MCU - may affect the operation of serial interfaces. Among those are parameters like clock configuration, power modes and GPIO configuration. If you’ve been through this process before, you know there are many reasons why a system may not work from the very first time. A logic analyzer like ScanaQuad can be very helpful at this stage as it will totally remove the guesswork from this process. For example, if you’re setting up an I2C communication bus between a microcontroller and a sensor, your design flow may look like this:
- Configure MCU and run a test code to read sensor signature over I2C
- Connect a logic analyzer to look at SDA and SCL lines
- Check SCL clock frequency and make sure it is coherent withwhat you expected
- Use protocol decoder feature to make sure address written in your code matches the address of the I2C slave device, and make changes in code if necessary. Ensure slave devices acknowledgemaster requests.
- First, you’ll need to identify what’s the normal behavior of your bus, and what isn’t. An abnormal behavior can be as simple as an address not being acknowledged or a data that read all ones (0xFF).
- Setup a trigger that matches this very specific situation you want to monitor
- Hit “Start” in ScanaStudio software, and get yourself a cup of coffee or some fresh air! As soon as the bug is detected, it will trigger a capture sequence, and you’ll be able to analyze the bug and hopefully fix it.