6. SW Cursor via Power ProfilerΒΆ

DA1468x SDK provides a debugging functionality which can be used to mark certain events and capture the corresponding pin levels with a logic analyzer. This feature can also be used for accurately measuring timing intervals. This feature can be used in combination with the Power Profiler tool for displaying the marked points of interest and measuring timing intervals.

  1. If not already done so, make a copy of the freertos_retarget sample code found in the SDK of the DA1468x family of devices. For more information on how to create a new project, see Create a New Project in the Starting a Project tutorial.
  1. To enable the SW cursor mechanism, set the appropriate macro in /config/custom_config_qspi.h:
#define dg_configUSE_SW_CURSOR  (1)
  1. This step is optional and is intended for those who are interested in using an external logic analyzer to capture the marked events. By default, P0.7 pin is the selected GPIO debugging output. The developer can change the default pin by setting the appropriate macro definitions in config/custom_config_qspi.h. For example, to select pin P1.5, add the following macro definitions:
#define SW_CURSOR_PORT  (1)
#define SW_CURSOR_PIN   (5)
  1. Call the following function at the point of interest. For example, modify the main task of the newly created project, that is prvTemplateTask, to mark an event every 200 ms.
for( ;; ) {
             /* Place this task in the blocked state until it is time to run again.
                The block time is specified in ticks, the constant used converts ticks
                to ms. While in the Blocked state this task will not consume any CPU
                time. */
             vTaskDelayUntil( &xNextWakeTime, mainCOUNTER_FREQUENCY_MS );

             test_counter++;

             /* Trigger the SW cursor */
             hw_cpm_trigger_sw_cursor();

             if (test_counter % (1000 / OS_TICKS_2_MS(mainCOUNTER_FREQUENCY_MS)) == 0) {
                     printf("#");
                     fflush(stdout);
             }
  1. Build the project either in Debug or Release mode and burn the generated image to the chip.
  2. Press the K2 button on Pro DevKit. This step starts the chip executing its firmware.
  3. Open SmartSnippets Toolbox and execute the following steps:
    1. Create a new project by selecting New (1). This step is optional if a project has already been created.
    2. Choose an available project (2).
    3. Choose a communication port (3).
    4. Select the family of devices that is being used (4).
    5. Open the selected project (5).
'Opening SmartSnippets Toolbox'

Fig. 32 Opening SmartSnippets Toolbox

  1. Start power profile monitoring:
    1. Switch to the Power Profiler window (1).
    2. Initialize Power Profiler (2).
    3. Start Power Profiler (3).
'Initializing Power Profiler'

Fig. 33 Initializing Power Profiler

  1. Monitor the SW cursor indicated by a red line.
'SW Cursor Indication'

Fig. 34 SW Cursor Indication