This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TivaWare 1.1 DK-TM4C123G QS-Logger not displaying Magnetometer / Gyrometer data in View Menu



There is an issue with the qs-logger application for the DK-TM4C123G in TivaWare for C Series 1.1 . In the “view” menu the values for the magnetometer and the gyrometer are not displayed. This issue will be fixed in TivaWare 2.0 . In between the release of 1.1 and 2.0 this post is meant to provide a patch to enable the measurements. The qs-logger application that comes already programmed on the DK-TM4C123G has this patch implemented.  If users wish to compile this example on their own they will need to make the changes described below:

3 files need code added,  located in the qs-logger folder at  C:\ti\TivaWare_C_Series-1.1\examples\boards\dk-tm4c123g\qs-logger\

-menus.h           (2 lines)

-qs-logger.c      (3 lines)

-acquire.c          (27 lines)

 

 

In menus.h
add these lines after line 60

extern tCanvasWidget g_sGyroContainerCanvas;
extern tCanvasWidget g_sMagContainerCanvas;

In qs-logger.c
add these lines to the else if statement on line 561

           (psWidget == &g_sGyroContainerCanvas.sBase) ||
            (psWidget == &g_sMagContainerCanvas.sBase) ||

On line 595 change the 0x3ff -> 0xffff so it reads

                sLocalState.ui16SelectedMask = 0x3ff;

 

In acquire.c
add this code at line 437 inside the bracket (at the end of the UpdateViewerData function)

    //
    // Loop through the gyro channels and update the text display strings.
    //

    for(ui32Idx = LOG_ITEM_GYROX; ui32Idx <= LOG_ITEM_GYROZ; ui32Idx++)
   {
        int16_t i16Gyro = psRecord->pi16Items[ui32Idx];

        i16Gyro *= (i16Gyro < 0) ? -1 : 1;

        usnprintf(pcViewerBuf, sizeof(pcViewerBuf), " %c: %c%d.%02u  rad/s",
                  (ui32Idx - LOG_ITEM_GYROX) + 'X',
                  psRecord->pi16Items[ui32Idx] < 0 ? '-' : '+',
                  i16Gyro / 100, i16Gyro % 100);

        MenuUpdateText(ui32Idx, pcViewerBuf);

    }

    //
    // Loop through the mag channels and update the text display strings.
    //

    for(ui32Idx = LOG_ITEM_COMPASSX; ui32Idx <= LOG_ITEM_COMPASSZ; ui32Idx++)
    {

        int16_t i16Compass = psRecord->pi16Items[ui32Idx];

        i16Compass *= (i16Compass < 0) ? -1 : 1;

        usnprintf(pcViewerBuf, sizeof(pcViewerBuf), " %c: %c%d uT ",
                  (ui32Idx - LOG_ITEM_COMPASSX) + 'X',
                  psRecord->pi16Items[ui32Idx] < 0 ? '-' : '+',
                  i16Compass);

        MenuUpdateText(ui32Idx, pcViewerBuf);

    }

 

 

 

Now rebuild and load the code onto the board. “View->Mag” and “View->Gyro” will now display the current sensor data.