Using Event Recorder for debugging a network
performance issue
MDK Tutorial
AN320, Summer 2019, V 1.0 feedback@keil.com
Abstract
In complex embedded applications, it is often very difficult to find a reason for reduced performance or
incorrect program operation.
This application note shows how Event Recorder and Keil MDK can be used for analyzing the program execution
and locating the root cause for poor performance in a real network example.
Prerequisites
Event Recorder can be used on any Arm Cortex-M based device and with any MDK Edition or debug adapter.
The concepts described in the application notes are universal.
The particular example used for analysis is based on MDK-Middleware that is available with MDK-Plus and MDK-
Professional editions.
Note: there is an evaluation version available for MDK-Professional.
Following software packs are used:
- ARM.CMSIS.5.0.1.pack (or higher) for CMSIS and CMSIS-RTOS
- Keil.ARM_Compiler.1.6.1.pack (or higher) for Event Recorder
- Keil.MDK-Middleware.7.8.0.pack (or higher) for MDK Network library
Contents
Using Event Recorder for debugging a network performance issue ..........................................................................1
Abstract ......................................................................................................................................................................1
Prerequisites ...............................................................................................................................................................1
Introduction ................................................................................................................................................................2
Problem Description ...................................................................................................................................................2
Symptoms ...............................................................................................................................................................2
Analyzing the issue .....................................................................................................................................................2
Debugging the network library ...............................................................................................................................3
Debugging the RTX5 thread switches .....................................................................................................................5
Debugging the Ethernet driver ...............................................................................................................................7
Adding custom events to the driver ....................................................................................................................7
Analyzing the complete flow ...............................................................................................................................8
Summary .................................................................................................................................................................. 10
Useful links .............................................................................................................................................................. 10