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.

Invalid CIO command when interrupt enabled

Other Parts Discussed in Thread: SEGGER

Hi all,

I'm playing with the the RTC on an MSP432 (MSP-EXP432P401R Launchpad) in a TI-RTOS (2.14.3.28) project.  I'm using CCS 6.1.1.

I started with the standard empty project (File->New-Project->C/C++->CCS Project->MSP432 Target->Project Template TI-RTOS Examples->MSP-EXP432P401R Launchpad->Driver Examples->TI Driver Examples->Empty Examples->Empty Project  phew!)

I've

  • created a HWI to deal with RTC interrupts (Interrupt number = 45, Priority = 14).
  • configured RTC to interrupt on ready to read, events (minute) and an alarm.
  • created clock function running every 5 seconds toggling red the multicolour led on and off
  • added and configured the seconds module (initialized to start with the same time as the RTC)
  • added and configured the timestamp module
  • heatBeat task changed to run every 2sec and to system_printf (and system_flush) time from the RTC, seconds module, timestamp module
  • (Code is attached at bottom)

If I disable RTC interrupts in my initialization using MAP_RTC_C_disableInterrupt() then all is well (though of course the functionality related to the RTC interrupts doesn't work).

If I enable RTC interrupts in my initialization MAP_RTC_C_enableInterrupt(), then everything seems to work, except I occassionally get the following message in the console (the xx numbers vary):

"Invalid CIO command (xx) in the CIO buffer at address (xx) was not recognized. Please check the device and program memory maps."

This still happens even if I make the Hwi empty or if I globally disable interrupts (Hwi_disable(), Hwi_restore()) during the Hwi

I'm guessing the RTC interrupt is happening while the micro is dealing with the CIO stuff causing the CIO buffer to be corrupted.

Any suggestions for how to fix this??

Cheers

Julian


/*
 * SNIP TI STD HEADER FOR BREVITY
 */


/* XDCtools Header files */
#include <xdc/std.h>
#include <xdc/cfg/global.h>
#include <xdc/runtime/System.h>

/* BIOS Header files */
#include <ti/sysbios/BIOS.h>

/* TI-RTOS Header files */
#include <ti/drivers/GPIO.h>

/* Board Header file */
#include "Board.h"

#include <xdc/runtime/Timestamp.h>
#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerMSP432.h>
#include <time.h>
#include <ti/sysbios/hal/Seconds.h>
#include <driverlib.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <xdc/runtime/Log.h>


int8_t readRTC(RTC_C_Calendar *td);

// DO NOT READ THESE DIRECTLY.  USE readRTC()
static volatile RTC_C_Calendar current_RTC_Time;
static volatile Bool current_RTC_Time_update_toggle = false;

/*
 *  ======== heartBeatFxn ========
 *  Toggle the Board_LED0. The Task_sleep is determined by arg0 which
 *  is configured for the heartBeat Task instance.
 */
//--------------------------------------------------------------------------------------------
// Function called by the heartBeat task
//--------------------------------------------------------------------------------------------
void heartBeatFxn(UArg arg0, UArg arg1)
{
    uint32_t ts32;
    xdc_runtime_Types_Timestamp64 ts64;
    xdc_runtime_Types_FreqHz freq;

    uint32_t sec;

    time_t t1;
    //struct tm *ltm, *gtm;
    //char *curTime, *curTime2;
    char *curTime3;

    RTC_C_Calendar RTCTime;

    int8_t errs;

    while (1) {
        Task_sleep((UInt)arg0);
        GPIO_toggle(Board_LED0);

        Timestamp_get64(&ts64);
        ts32 = Timestamp_get32();
        Timestamp_getFreq(&freq);

        sec = Seconds_get();
        t1 = time(NULL);  // This overrides the standard time() function to return Seconds_get() adjusted for epoch from 1/1/1900

        // Without having set time zone or DLS mode all three strings end up the same
        //ltm = localtime(&t1); curTime = asctime(ltm);
        //gtm = gmtime(&t1);    curTime2 = asctime(gtm);
        curTime3 = ctime(&t1);    // Really same as first approach above.  Uses localTime internally

        errs += readRTC(&RTCTime);

        System_printf("TSh64-%lu TSl64-%lu, TS32-%lu, FRh-%lu FRl-%lu\n", ts64.hi, ts64.lo, ts32, freq.hi, freq.lo);
        System_printf("Seconds: %lu, %lu, %s", sec, (uint32_t)t1, curTime3);
        System_printf("RTC: %02u/%02u/%02u (%u) %02u:%02u:%02u\n\n",	RTCTime.dayOfmonth,RTCTime.month,RTCTime.year,RTCTime.dayOfWeek,RTCTime.hours,RTCTime.minutes,RTCTime.seconds);
        System_flush();

        Log_info5("TSh64-%u TSl64-%u, TS32-%u, FRh-%u FRl-%u\n", ts64.hi, ts64.lo, ts32, freq.hi, freq.lo);
    }
}

//--------------------------------------------------------------------------------------------
// Function called by clock0 
//--------------------------------------------------------------------------------------------
void periodicFxn(void)
{
    GPIO_toggle(Board_LED1);
}

//--------------------------------------------------------------------------------------------
// Never use current_RTC_Time directly, use this function to get a copy.
// This function provides protection against time updates midread.
// This function is thread safe??
//--------------------------------------------------------------------------------------------
int8_t readRTC(RTC_C_Calendar *td)
{
    Bool toggleState;
    uint8_t tries = 0;

    do
    {
	toggleState = current_RTC_Time_update_toggle;

	td->seconds    = current_RTC_Time.seconds;
	td->minutes    = current_RTC_Time.minutes;
	td->hours      = current_RTC_Time.hours;
	td->dayOfWeek  = current_RTC_Time.dayOfWeek;
	td->dayOfmonth = current_RTC_Time.dayOfmonth;
	td->month      = current_RTC_Time.month;
	td->year       = current_RTC_Time.year;

	tries++;	// Should never take more than two tries because period between RTC updates is huge relative to runtime of this function.
    } while ((toggleState != current_RTC_Time_update_toggle) && (tries <= 3));

    if (tries <= 3)
    {
    	return (0);
    }
    else
    {
    	return (1);
    }
}


//--------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------
void hwi_RTCHandler(void)
{
    uint32_t status;
    //UInt pDIE;

    //pDIE = Hwi_disable();
    status = MAP_RTC_C_getEnabledInterruptStatus();
    MAP_RTC_C_clearInterruptFlag(status);

    if (status & RTC_C_CLOCK_READ_READY_INTERRUPT)
    {
   	current_RTC_Time = MAP_RTC_C_getCalendarTime();
  	current_RTC_Time_update_toggle = ~current_RTC_Time_update_toggle;

        MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P8, GPIO_PIN5);
    }

    if (status & RTC_C_TIME_EVENT_INTERRUPT)
    {
   	MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P9, GPIO_PIN0);
    }

    if (status & RTC_C_CLOCK_ALARM_INTERRUPT)
    {
   	MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P8, GPIO_PIN4);
    }
    //Hwi_restore(pDIE);
}



//--------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------
void RTCInit(void)
{
    // Haven't setup power management stuff yet!

    struct tm t;
    time_t t1;
    RTC_C_Calendar start_RTC_Time;

    // External battery backed RTC would usually be the time master from which we set the internal RTC. 
    // Here I just set a dummy time

    /* Time is Tuesday January 19th 2016 10:03:00 PM */
    start_RTC_Time.seconds   	= 0;
    start_RTC_Time.minutes    	= 3;
    start_RTC_Time.hours      	= 22;
    start_RTC_Time.dayOfWeek  	= 2;   // Doesn't seem to be any smarts behind this (not worked out from date,
                                       // no expected definition for what day 0 is) so I use 0=Sunday to match time.h
    start_RTC_Time.dayOfmonth 	= 19;
    start_RTC_Time.month      	= 1;   // 1..12
    start_RTC_Time.year       	= 2016; // 0.. 4095

    // Current RTC time = RTC start time
    current_RTC_Time.seconds    = start_RTC_Time.seconds;
    current_RTC_Time.minutes    = start_RTC_Time.minutes;
    current_RTC_Time.hours      = start_RTC_Time.hours;
    current_RTC_Time.dayOfWeek  = start_RTC_Time.dayOfWeek;
    current_RTC_Time.dayOfmonth = start_RTC_Time.dayOfmonth;
    current_RTC_Time.month      = start_RTC_Time.month;
    current_RTC_Time.year       = start_RTC_Time.year;

    // Current Seconds since epoch -> set based on RTC start time
    t.tm_sec   			= start_RTC_Time.seconds;
    t.tm_min  			= start_RTC_Time.minutes;
    t.tm_hour  			= start_RTC_Time.hours;
    t.tm_wday			= start_RTC_Time.dayOfWeek;    // time.h uses 0 = Sunday
    t.tm_mday  			= start_RTC_Time.dayOfmonth;
    t.tm_mon   			= start_RTC_Time.month - 1;    // time.h uses 0..11
    t.tm_year  			= start_RTC_Time.year - 1900;  // time.h uses years since 1900

    t1 = mktime(&t);

    RTC_C_initCalendar(&start_RTC_Time, RTC_C_FORMAT_BINARY); // Set RTC-C - its hasn't started yet!

    MAP_RTC_C_setCalendarEvent(RTC_C_CALENDAREVENT_MINUTECHANGE); // Event interrupt - have minute, hour, noon, midnight options
    MAP_RTC_C_setCalendarAlarm(0x05, 0x22, RTC_C_ALARMCONDITION_OFF, RTC_C_ALARMCONDITION_OFF); // Alarm interrupt - set for 10:05

    // Generate interrupt on RTC ready to read, RTC event or RTC alarm
    MAP_RTC_C_clearInterruptFlag(RTC_C_CLOCK_READ_READY_INTERRUPT | RTC_C_TIME_EVENT_INTERRUPT | RTC_C_CLOCK_ALARM_INTERRUPT);
    MAP_RTC_C_enableInterrupt(RTC_C_CLOCK_READ_READY_INTERRUPT | RTC_C_TIME_EVENT_INTERRUPT | RTC_C_CLOCK_ALARM_INTERRUPT);
    //MAP_RTC_C_disableInterrupt(RTC_C_CLOCK_READ_READY_INTERRUPT | RTC_C_TIME_EVENT_INTERRUPT | RTC_C_CLOCK_ALARM_INTERRUPT);

    // Just before we start up the RTC, set the RTOS seconds module to a matching time.
    Seconds_set(t1 - 2208988800);  // Seconds module uses Unix epoch (1/1/1970, 00:00:00) but TI time function use an epoch starting at 1/1/1900 00:00:00:00

    MAP_RTC_C_startClock();
    //MAP_Interrupt_enableInterrupt(INT_RTC_C);	// Don't seem to need this.  Does the RTOS do it for me?    

}

/*
 *  ======== main ========
 */
int main(void)
{
    WDT_A_holdTimer();

    /* Call board init functions */
    Board_initGeneral();
    Board_initGPIO();
    // Board_initI2C();
    // Board_initSDSPI();
    // Board_initSPI();
    // Board_initUART();
    // Board_initWatchdog();
    // Board_initWiFi();

    //Power_enablePolicy();

   RTCInit();


    /* Turn on user LED */
    GPIO_write(Board_LED0, Board_LED_ON);

    System_printf("Starting the example\nSystem provider is set to SysMin. "
                  "Halt the target to view any SysMin contents in ROV.\n");
    /* SysMin will only print to the console when you call flush or exit */
    System_flush();

    /* Start BIOS */
    BIOS_start();

    return (0);
}

  • Julian,

    Can you please post the .cfg file you're using?

    Thanks,
    Scott

  • Hi Scott,

    Config file is attached below.

    I'm using the MSP_432P401R.h and .cmd are unchanged from the default empty project.

    In MSP_432P401R.c, GPIO_PinConfig gpioPinConfigs[]  is changed slightly as shown below.

    -------------------------------------------------------------------------------------------------------------------

    GPIO_PinConfig gpioPinConfigs[] = {
        /* Input pins */
        /* MSP_EXP432P401R_S1 */
        GPIOMSP432_P1_1 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING,
        /* MSP_EXP432P401R_S2 */
        GPIOMSP432_P1_4 | GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_RISING,
    
        /* Output pins */
        /* MSP_EXP432P401R_LED1 */
        GPIOMSP432_P1_0 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
        /* MSP_EXP432P401R_LED_RED */
        GPIOMSP432_P2_0 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
        // Test points
        GPIOMSP432_P8_5 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
        GPIOMSP432_P9_0 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
        GPIOMSP432_P8_4 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW,
    
    };

    ------------------------------------------------------------------------------------------------------------------

    /*
     * SNIP TI STD HEADER FOR BREVITY
     */
    
    /*
     *  ======== empty.cfg ========
     */
    
    /* ================ General configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
    var Seconds = xdc.useModule('ti.sysbios.hal.Seconds');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    
    /*
     *  Program.stack is ignored with IAR. Use the project options in
     *  IAR Embedded Workbench to alter the system stack size.
     */
    if (!Program.build.target.$name.match(/iar/)) {
        /*
         *  Reducing the system stack size (used by ISRs and Swis) to reduce
         *  RAM usage.
         */
        Program.stack = 0x300;
    }
    
    /* ================ System configuration ================ */
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    System.SupportProxy = SysMin;
    
    /* Enable Semihosting for GNU targets to print to CCS console */
    if (Program.build.target.$name.match(/gnu/)) {
        var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
    }
    
    /* ================ Kernel configuration ================ */
    /* Use Custom library */
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.logsEnabled = true;
    BIOS.assertsEnabled = true;
    
    var task0Params = new Task.Params();
    task0Params.instance.name = "heartBeat";
    task0Params.arg0 = 2000;
    task0Params.stackSize = 512;
    Program.global.heartBeatTask = Task.create("&heartBeatFxn", task0Params);
    
    /* ================ Driver configuration ================ */
    var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
    TIRTOS.useGPIO = true;
    Clock.tickMode = Clock.TickMode_PERIODIC;
    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "clock0";
    clock0Params.period = 5000;
    clock0Params.startFlag = true;
    Program.global.clock0 = Clock.create("&periodicFxn", 5000, clock0Params);
    Hwi.dispatcherAutoNestingSupport = false;
    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwiRTC";
    hwi0Params.priority = 14;
    hwi0Params.arg = 0;
    hwi0Params.maskSetting = xdc.module("ti.sysbios.interfaces.IHwi").MaskingOption_LOWER;
    Program.global.hwiRTC = Hwi.create(45, "&hwi_RTCHandler", hwi0Params);
    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
    

  • Thanks Julian.  I’ll look at this tomorrow and get back to you…

    Regards,
    Scott

  • Hi Julian,

    I looked at this more and don’t see any obvious problem.  When I’ve seen these types of errors in the past it is usually a stack overflow that has encroached on the CIO command buffer, after which CCS reports an error.

    I am curious about your disabling of nesting support in your .cfg file:
        Hwi.dispatcherAutoNestingSupport = false;

    If you comment out this line, do you still see the CIO errors?

    Have you tried looking at the kernel state with ROV when this happens?  If you click on the BIOS module, and click the tab “Scan for errors…”, do any errors get reported?

    And if you open a memory window and look at the buffer address “__CIOBUF_” (two leading underscores, and only one trailing), in character format, do you see what looks like it may be an overwrite with a recognizable pattern?

    Thanks,
    Scott

  • G'Day Scott,

    >I am curious about your disabling of nesting support in your .cfg file:
    >    Hwi.dispatcherAutoNestingSupport = false;
    >If you comment out this line, do you still see the CIO errors?

    I turned off nesting based on the TI-RTOS training videos where the general advice seems to be "if you keep ISRs short, you won't need nesting".  I happy with this at this early stage of development. 

    I've tried

    • removing the line you specify. 
    • explicitly setting Hwi.dispatcherAutoNestingSupport to true
    • changing my Hwi priority from 1 to 14.  (I thought it might make a difference because the only valid MaskingOption for MSP432 is "MaskOption_Lower")

    made no difference :-(

    >Have you tried looking at the kernel state with ROV when this happens?

    >If you click on the BIOS module, and click the tab “Scan for errors…”,

    >do any errors get reported?

    I pause execution as quickly as I can after one oft he "Invalid CIO Errors" occurs and looked in ROV -

    • No errors in "Scan for errors"
    • Everything else in ROV looks right to me. 

    > And if you open a memory window and look at the buffer address “__CIOBUF_” (two leading

    > underscores, and only one trailing), in character format, do you see what looks like it may be

    > an overwrite with a recognizable pattern?

    I hope the following makes sense - I'm having trouble describing it clearly.

    I've tried looking at CIOBUF

    • after a bunch of data is sent to the console (and no error occurs) and
    • immediately after an error (Invalid CIO command (X).....).

    I look at the good data first and the "bad" data second.

    The two memory dumps are "identical".  Of course, the specific time text changes between the dumps, but all the other hex stuff around that text (which I guess is framing for the message) stays the same.

    Most critically, the error gives a command number - e.g. "Invalid CIO command (165) in the CIO buffer at address (0x20002AC0) was not recognized.".

    I see that exact command number (165 or 0xA5 in this particular case) at address 0x20002AC4 (second word of __CIOBUF_) in BOTH the good and the bad case.  (The images below show the memory contents.)

    So for some reason, I'm getting "Invalid CIO command errors" even though the contents of __CIOBUF_ has not materially changed.   There does not appear to be a CRC in this data that might account for this.

    Cheers

    Julian

    [EDIT - Images cut and paste into the rich text editor, but didn't end up in the post, so try adding them again]

  • Hi Julian,

    Thanks for trying with nesting support, and all the additional details.  

    Can you confirm – is your application running fine, with no obvious misbehavior, just these occasional CIO error messages?  If so, it is possible that it is not a ‘target’ issue, but maybe a CCS or emulation issue.  Today I searched the forums for ”Invalid CIO command” and there are many threads, and often the resolution is not an issue with the target processor.

    And to confirm: even with an empty ISR for the RTC, you are seeing this?

    And, how often is the RTC interrupting?  

    And finally, is it possible for you to send me the project so I can try to reproduce it?  And maybe loop in the CCS team if need be?  If you don’t want to post it directly to the forum then we can become forum ‘friends‘ and then you can send it to me privately.  Does this work?

    Thanks,
    Scott

  • time2.zip

    Hi Scott,

    I've cut down the application to the simplest example that still has the error.  The resulting project is attached as a zip file.

    > Can you confirm – is your application running fine, with no obvious

    > misbehavior, just these occasional CIO error messages?

    Yes, on the surface the project seems to work fine, except the occassional Invalid CIO command error. (The errors go away if you remove the system_printf() calls or if you comment out the line that enables particular RTC interrupts)

    However, I do suspect there is something else going.  I have another project that toggles one pin on each RTC interrupt and another pin every second using a device specific timer (this timer also maintains a seconds count).  Observing these waveforms I occassionally see "time slips" (i.e. the relative phase of the two waveforms suddenly changing).  Sometimes the time slips appear to correspond to Invalid CIO command errors.  Other times they don't.  These time slips are "real" in the sense that when the time slip occurs, the seconds count maintained by the timer shifts with respect to the RTC seconds count when the slips occur. 

    (I can send this slightly more complex project to you as well if you like).

    >And to confirm: even with an empty ISR for the RTC, you are seeing this?

    The RTC ISR is not completely empty, it just clears the interrupt flag.  It gets upset if I don't do that.

    > And, how often is the RTC interrupting? 

    The ISR is called once per second (every time the RTC generates a READ_READY interrupt).

    Cheers

    Julian

  • Hi Julian,

    Great, thanks very much for posting the project!  I will see if I can debug this.  I hope to get back to you tomorrow...

    For the time slips… when CCS does target I/O it will interrupt the target and this will cause changes in app behavior versus a standalone run.  Maybe the time slips will go away if you boot without CCS?...

    Regards,
    Scott

  • G'Day Scott,

    I appreciate your help on this.

    I've tried "Free running" the application (running without CCS/Debugger) and the time skips do appear to go awa,y so maybe the Invalid CIO Command problem I'm having is related to the debugger doing its thing.

    Cheers
    Julian
  • Hi Julian,

    OK, good to hear free run takes the time slips away.

    I built and then ran your test yesterday and didn’t see any CIO errors.  So I restarted and ran it overnight (going about 16hrs now) and still no CIO errors.  I’m using the same CCS and TI-RTOS versions.  The only difference I see is that I have the 5.2.5 compiler installed, and you're using 5.2.6.  

    I’m running on a PC.  Are you too?  Or are you on Mac or Linux?

    It really sounds like a debugger/emulation/CIO issue to me.  I’m thinking maybe I should ask to have this thread moved to the CCS forum to get some better help there.  Are you OK with that?

    Thanks,
    Scott

  • Julian Kolodko said:
    I've cut down the application to the simplest example that still has the error.  The resulting project is attached as a zip file.

    I tried your project, and got "Invalid CIO command" errors reported in the CCS CIO console, albeit different numbers:

    [CORTEX_M4_0] Boo
    Invalid CIO command (4) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    Boo
    Boo
    Boo
    Boo
    Invalid CIO command (4) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    Boo
    Boo
    Boo
    Boo
    Invalid CIO command (4) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    Boo
    Boo
    

    CIO System Call Protocol describes the CIO commands, and 4 isn't a valid command number. If the memory browser is set displaying the __CIOBUF_ with continuous refresh then when the program is running with "Invalid CIO command" reported the memory browser shows the command is mostly the invalid value of 4 but sometimes is the valid value 0xF3 (_DTWRITE). The continuous refresh in the memory browser is sampling memory at a slow rate (2Hz?).

    I set a hardware watchpoint to trigger on a write to the address 0x200028C4 which contains the CIO command. However, the watchpoint was only triggered by the __TI_writemsg function when the CIO command in the __CIOBUF_ was the valid value 0xF3. i.e. don't think the CPU is writing the invalid values. Will attempt to investigate further.

    I was using:

    - A MSP432 launchpad

    - CCS 6.1.2.00014 under Linux

    - TI ARM compiler v5.2.6

    - TI-RTOS for MSP43x v2.14.3.8

  • Chester Gillon said:
    I was using:

    - A MSP432 launchpad

    - CCS 6.1.2.00014 under Linux

    For the test under Linux which repeated the problem, was using the on-board XDS110 emulator of the MSP432 launchpad.

    Ran the same program with CCS 6.1.1 under Windows, but with different emulators. Also enabled the display of timestamps in the CIO output to look at the message rate, the test program outputs the string "Boo\n" every 2 seconds using CIO.

    1) On-board XDS110 set to "SWD Mode - Aux COM port is target TDO" pin with no Hardware Trace Analyzer running, got 18 errors and 191 expected strings:

    [CORTEX_M4_0] [Sun Jan 31 16:48:50] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:48:52] Boo
    [Sun Jan 31 16:48:54] Boo
    [Sun Jan 31 16:48:56] Boo
    [Sun Jan 31 16:48:58] Boo
    [Sun Jan 31 16:49:01] Boo
    [Sun Jan 31 16:49:03] Boo
    [Sun Jan 31 16:49:05] Boo
    [Sun Jan 31 16:49:07] Boo
    [Sun Jan 31 16:49:09] Boo
    [Sun Jan 31 16:49:11] Boo
    [Sun Jan 31 16:49:13] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:49:15] Boo
    [Sun Jan 31 16:49:17] Boo
    [Sun Jan 31 16:49:19] Boo
    [Sun Jan 31 16:49:21] Boo
    [Sun Jan 31 16:49:24] Boo
    [Sun Jan 31 16:49:26] Boo
    [Sun Jan 31 16:49:28] Boo
    [Sun Jan 31 16:49:30] Boo
    [Sun Jan 31 16:49:32] Boo
    [Sun Jan 31 16:49:34] Boo
    [Sun Jan 31 16:49:36] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:49:38] Boo
    [Sun Jan 31 16:49:40] Boo
    [Sun Jan 31 16:49:42] Boo
    [Sun Jan 31 16:49:45] Boo
    [Sun Jan 31 16:49:47] Boo
    [Sun Jan 31 16:49:49] Boo
    [Sun Jan 31 16:49:51] Boo
    [Sun Jan 31 16:49:53] Boo
    [Sun Jan 31 16:49:55] Boo
    [Sun Jan 31 16:49:57] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:49:59] Boo
    [Sun Jan 31 16:50:01] Boo
    [Sun Jan 31 16:50:04] Boo
    [Sun Jan 31 16:50:06] Boo
    [Sun Jan 31 16:50:08] Boo
    [Sun Jan 31 16:50:10] Boo
    [Sun Jan 31 16:50:12] Boo
    [Sun Jan 31 16:50:14] Boo
    [Sun Jan 31 16:50:16] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:50:18] Boo
    [Sun Jan 31 16:50:20] Boo
    [Sun Jan 31 16:50:22] Boo
    [Sun Jan 31 16:50:25] Boo
    [Sun Jan 31 16:50:27] Boo
    [Sun Jan 31 16:50:29] Boo
    [Sun Jan 31 16:50:31] Boo
    [Sun Jan 31 16:50:33] Boo
    [Sun Jan 31 16:50:35] Boo
    [Sun Jan 31 16:50:37] Boo
    [Sun Jan 31 16:50:39] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:50:41] Boo
    [Sun Jan 31 16:50:43] Boo
    [Sun Jan 31 16:50:45] Boo
    [Sun Jan 31 16:50:48] Boo
    [Sun Jan 31 16:50:50] Boo
    [Sun Jan 31 16:50:52] Boo
    [Sun Jan 31 16:50:54] Boo
    [Sun Jan 31 16:50:56] Boo
    [Sun Jan 31 16:50:58] Boo
    [Sun Jan 31 16:51:00] Boo
    [Sun Jan 31 16:51:02] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:51:04] Boo
    [Sun Jan 31 16:51:06] Boo
    [Sun Jan 31 16:51:08] Boo
    [Sun Jan 31 16:51:11] Boo
    [Sun Jan 31 16:51:13] Boo
    [Sun Jan 31 16:51:15] Boo
    [Sun Jan 31 16:51:17] Boo
    [Sun Jan 31 16:51:19] Boo
    [Sun Jan 31 16:51:21] Boo
    [Sun Jan 31 16:51:23] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:51:25] Boo
    [Sun Jan 31 16:51:27] Boo
    [Sun Jan 31 16:51:29] Boo
    [Sun Jan 31 16:51:32] Boo
    [Sun Jan 31 16:51:34] Boo
    [Sun Jan 31 16:51:36] Boo
    [Sun Jan 31 16:51:38] Boo
    [Sun Jan 31 16:51:40] Boo
    [Sun Jan 31 16:51:42] Boo
    [Sun Jan 31 16:51:44] Boo
    [Sun Jan 31 16:51:46] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:51:48] Boo
    [Sun Jan 31 16:51:50] Boo
    [Sun Jan 31 16:51:53] Boo
    [Sun Jan 31 16:51:55] Boo
    [Sun Jan 31 16:51:57] Boo
    [Sun Jan 31 16:51:59] Boo
    [Sun Jan 31 16:52:01] Boo
    [Sun Jan 31 16:52:03] Boo
    [Sun Jan 31 16:52:05] Boo
    [Sun Jan 31 16:52:07] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:52:09] Boo
    [Sun Jan 31 16:52:11] Boo
    [Sun Jan 31 16:52:13] Boo
    [Sun Jan 31 16:52:16] Boo
    [Sun Jan 31 16:52:18] Boo
    [Sun Jan 31 16:52:20] Boo
    [Sun Jan 31 16:52:22] Boo
    [Sun Jan 31 16:52:24] Boo
    [Sun Jan 31 16:52:26] Boo
    [Sun Jan 31 16:52:28] Boo
    [Sun Jan 31 16:52:30] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:52:32] Boo
    [Sun Jan 31 16:52:34] Boo
    [Sun Jan 31 16:52:36] Boo
    [Sun Jan 31 16:52:39] Boo
    [Sun Jan 31 16:52:41] Boo
    [Sun Jan 31 16:52:43] Boo
    [Sun Jan 31 16:52:45] Boo
    [Sun Jan 31 16:52:47] Boo
    [Sun Jan 31 16:52:49] Boo
    [Sun Jan 31 16:52:51] Boo
    [Sun Jan 31 16:52:53] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:52:55] Boo
    [Sun Jan 31 16:52:57] Boo
    [Sun Jan 31 16:53:00] Boo
    [Sun Jan 31 16:53:02] Boo
    [Sun Jan 31 16:53:04] Boo
    [Sun Jan 31 16:53:06] Boo
    [Sun Jan 31 16:53:08] Boo
    [Sun Jan 31 16:53:10] Boo
    [Sun Jan 31 16:53:12] Boo
    [Sun Jan 31 16:53:14] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:53:16] Boo
    [Sun Jan 31 16:53:18] Boo
    [Sun Jan 31 16:53:20] Boo
    [Sun Jan 31 16:53:23] Boo
    [Sun Jan 31 16:53:25] Boo
    [Sun Jan 31 16:53:27] Boo
    [Sun Jan 31 16:53:29] Boo
    [Sun Jan 31 16:53:31] Boo
    [Sun Jan 31 16:53:33] Boo
    [Sun Jan 31 16:53:35] Boo
    [Sun Jan 31 16:53:37] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:53:39] Boo
    [Sun Jan 31 16:53:41] Boo
    [Sun Jan 31 16:53:44] Boo
    [Sun Jan 31 16:53:46] Boo
    [Sun Jan 31 16:53:48] Boo
    [Sun Jan 31 16:53:50] Boo
    [Sun Jan 31 16:53:52] Boo
    [Sun Jan 31 16:53:54] Boo
    [Sun Jan 31 16:53:56] Boo
    [Sun Jan 31 16:53:58] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:54:00] Boo
    [Sun Jan 31 16:54:02] Boo
    [Sun Jan 31 16:54:04] Boo
    [Sun Jan 31 16:54:07] Boo
    [Sun Jan 31 16:54:09] Boo
    [Sun Jan 31 16:54:11] Boo
    [Sun Jan 31 16:54:13] Boo
    [Sun Jan 31 16:54:15] Boo
    [Sun Jan 31 16:54:17] Boo
    [Sun Jan 31 16:54:19] Boo
    [Sun Jan 31 16:54:21] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:54:23] Boo
    [Sun Jan 31 16:54:25] Boo
    [Sun Jan 31 16:54:28] Boo
    [Sun Jan 31 16:54:30] Boo
    [Sun Jan 31 16:54:32] Boo
    [Sun Jan 31 16:54:34] Boo
    [Sun Jan 31 16:54:36] Boo
    [Sun Jan 31 16:54:38] Boo
    [Sun Jan 31 16:54:40] Boo
    [Sun Jan 31 16:54:42] Boo
    [Sun Jan 31 16:54:44] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:54:46] Boo
    [Sun Jan 31 16:54:48] Boo
    [Sun Jan 31 16:54:51] Boo
    [Sun Jan 31 16:54:53] Boo
    

    2) On-board XDS110 set to "SWD Mode - Aux COM port is target TDO" pin with Interrupt Profiling Hardware Trace Analyzer running, got 32 errors and 62 expected strings:

    [CORTEX_M4_0] [Sun Jan 31 16:57:29] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:57:34] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:57:39] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:57:45] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:57:50] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:57:55] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:00] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:06] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:11] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:16] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:21] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:27] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:32] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:37] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:43] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:48] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:53] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:58:58] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:04] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:09] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:14] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:19] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:25] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:30] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:35] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:40] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:46] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:51] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 16:59:56] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 17:00:02] Boo
    Invalid CIO command (26) in the CIO buffer at address (0x200028C0) was not recognized. Please check the device and program memory maps.
    

    3) Using an external Segger J-Link set to SWD, got no errors and 262 expected strings:

    [Sun Jan 31 17:18:36] Boo
    [Sun Jan 31 17:18:38] Boo
    [Sun Jan 31 17:18:40] Boo
    [Sun Jan 31 17:18:42] Boo
    [Sun Jan 31 17:18:44] Boo
    [Sun Jan 31 17:18:46] Boo
    [Sun Jan 31 17:18:48] Boo
    [Sun Jan 31 17:18:50] Boo
    [Sun Jan 31 17:18:52] Boo
    [Sun Jan 31 17:18:54] Boo
    [Sun Jan 31 17:18:55] Boo
    [Sun Jan 31 17:18:57] Boo
    [Sun Jan 31 17:18:59] Boo
    [Sun Jan 31 17:19:01] Boo
    [Sun Jan 31 17:19:03] Boo
    [Sun Jan 31 17:19:05] Boo
    [Sun Jan 31 17:19:07] Boo
    [Sun Jan 31 17:19:09] Boo
    [Sun Jan 31 17:19:11] Boo
    [Sun Jan 31 17:19:13] Boo
    [Sun Jan 31 17:19:15] Boo
    [Sun Jan 31 17:19:17] Boo
    [Sun Jan 31 17:19:19] Boo
    [Sun Jan 31 17:19:21] Boo
    [Sun Jan 31 17:19:23] Boo
    [Sun Jan 31 17:19:25] Boo
    [Sun Jan 31 17:19:27] Boo
    [Sun Jan 31 17:19:29] Boo
    [Sun Jan 31 17:19:31] Boo
    [Sun Jan 31 17:19:33] Boo
    [Sun Jan 31 17:19:35] Boo
    [Sun Jan 31 17:19:37] Boo
    [Sun Jan 31 17:19:39] Boo
    [Sun Jan 31 17:19:41] Boo
    [Sun Jan 31 17:19:43] Boo
    [Sun Jan 31 17:19:45] Boo
    [Sun Jan 31 17:19:47] Boo
    [Sun Jan 31 17:19:49] Boo
    [Sun Jan 31 17:19:51] Boo
    [Sun Jan 31 17:19:53] Boo
    [Sun Jan 31 17:19:55] Boo
    [Sun Jan 31 17:19:57] Boo
    [Sun Jan 31 17:19:58] Boo
    [Sun Jan 31 17:20:00] Boo
    [Sun Jan 31 17:20:02] Boo
    [Sun Jan 31 17:20:04] Boo
    [Sun Jan 31 17:20:06] Boo
    [Sun Jan 31 17:20:08] Boo
    [Sun Jan 31 17:20:10] Boo
    [Sun Jan 31 17:20:12] Boo
    [Sun Jan 31 17:20:14] Boo
    [Sun Jan 31 17:20:16] Boo
    [Sun Jan 31 17:20:18] Boo
    [Sun Jan 31 17:20:20] Boo
    [Sun Jan 31 17:20:22] Boo
    [Sun Jan 31 17:20:24] Boo
    [Sun Jan 31 17:20:26] Boo
    [Sun Jan 31 17:20:28] Boo
    [Sun Jan 31 17:20:30] Boo
    [Sun Jan 31 17:20:32] Boo
    [Sun Jan 31 17:20:34] Boo
    [Sun Jan 31 17:20:36] Boo
    [Sun Jan 31 17:20:38] Boo
    [Sun Jan 31 17:20:40] Boo
    [Sun Jan 31 17:20:42] Boo
    [Sun Jan 31 17:20:44] Boo
    [Sun Jan 31 17:20:46] Boo
    [Sun Jan 31 17:20:48] Boo
    [Sun Jan 31 17:20:50] Boo
    [Sun Jan 31 17:20:52] Boo
    [Sun Jan 31 17:20:54] Boo
    [Sun Jan 31 17:20:56] Boo
    [Sun Jan 31 17:20:58] Boo
    [Sun Jan 31 17:21:00] Boo
    [Sun Jan 31 17:21:02] Boo
    [Sun Jan 31 17:21:04] Boo
    [Sun Jan 31 17:21:06] Boo
    [Sun Jan 31 17:21:08] Boo
    [Sun Jan 31 17:21:10] Boo
    [Sun Jan 31 17:21:12] Boo
    [Sun Jan 31 17:21:14] Boo
    [Sun Jan 31 17:21:16] Boo
    [Sun Jan 31 17:21:18] Boo
    [Sun Jan 31 17:21:20] Boo
    [Sun Jan 31 17:21:22] Boo
    [Sun Jan 31 17:21:24] Boo
    [Sun Jan 31 17:21:25] Boo
    [Sun Jan 31 17:21:27] Boo
    [Sun Jan 31 17:21:29] Boo
    [Sun Jan 31 17:21:31] Boo
    [Sun Jan 31 17:21:33] Boo
    [Sun Jan 31 17:21:35] Boo
    [Sun Jan 31 17:21:37] Boo
    [Sun Jan 31 17:21:39] Boo
    [Sun Jan 31 17:21:41] Boo
    [Sun Jan 31 17:21:43] Boo
    [Sun Jan 31 17:21:45] Boo
    [Sun Jan 31 17:21:47] Boo
    [Sun Jan 31 17:21:49] Boo
    [Sun Jan 31 17:21:51] Boo
    [Sun Jan 31 17:21:53] Boo
    [Sun Jan 31 17:21:55] Boo
    [Sun Jan 31 17:21:57] Boo
    [Sun Jan 31 17:21:59] Boo
    [Sun Jan 31 17:22:01] Boo
    [Sun Jan 31 17:22:03] Boo
    [Sun Jan 31 17:22:05] Boo
    [Sun Jan 31 17:22:07] Boo
    [Sun Jan 31 17:22:09] Boo
    [Sun Jan 31 17:22:11] Boo
    [Sun Jan 31 17:22:13] Boo
    [Sun Jan 31 17:22:15] Boo
    [Sun Jan 31 17:22:17] Boo
    [Sun Jan 31 17:22:19] Boo
    [Sun Jan 31 17:22:21] Boo
    [Sun Jan 31 17:22:23] Boo
    [Sun Jan 31 17:22:25] Boo
    [Sun Jan 31 17:22:27] Boo
    [Sun Jan 31 17:22:29] Boo
    [Sun Jan 31 17:22:30] Boo
    [Sun Jan 31 17:22:32] Boo
    [Sun Jan 31 17:22:34] Boo
    [Sun Jan 31 17:22:36] Boo
    [Sun Jan 31 17:22:38] Boo
    [Sun Jan 31 17:22:40] Boo
    [Sun Jan 31 17:22:42] Boo
    [Sun Jan 31 17:22:44] Boo
    [Sun Jan 31 17:22:46] Boo
    [Sun Jan 31 17:22:48] Boo
    [Sun Jan 31 17:22:50] Boo
    [Sun Jan 31 17:22:52] Boo
    [Sun Jan 31 17:22:54] Boo
    [Sun Jan 31 17:22:56] Boo
    [Sun Jan 31 17:22:58] Boo
    [Sun Jan 31 17:23:00] Boo
    [Sun Jan 31 17:23:02] Boo
    [Sun Jan 31 17:23:04] Boo
    [Sun Jan 31 17:23:06] Boo
    [Sun Jan 31 17:23:08] Boo
    [Sun Jan 31 17:23:10] Boo
    [Sun Jan 31 17:23:12] Boo
    [Sun Jan 31 17:23:14] Boo
    [Sun Jan 31 17:23:16] Boo
    [Sun Jan 31 17:23:18] Boo
    [Sun Jan 31 17:23:20] Boo
    [Sun Jan 31 17:23:22] Boo
    [Sun Jan 31 17:23:24] Boo
    [Sun Jan 31 17:23:26] Boo
    [Sun Jan 31 17:23:28] Boo
    [Sun Jan 31 17:23:30] Boo
    [Sun Jan 31 17:23:32] Boo
    [Sun Jan 31 17:23:33] Boo
    [Sun Jan 31 17:23:35] Boo
    [Sun Jan 31 17:23:37] Boo
    [Sun Jan 31 17:23:39] Boo
    [Sun Jan 31 17:23:41] Boo
    [Sun Jan 31 17:23:43] Boo
    [Sun Jan 31 17:23:45] Boo
    [Sun Jan 31 17:23:47] Boo
    [Sun Jan 31 17:23:49] Boo
    [Sun Jan 31 17:23:51] Boo
    [Sun Jan 31 17:23:53] Boo
    [Sun Jan 31 17:23:55] Boo
    [Sun Jan 31 17:23:57] Boo
    [Sun Jan 31 17:23:59] Boo
    [Sun Jan 31 17:24:01] Boo
    [Sun Jan 31 17:24:03] Boo
    [Sun Jan 31 17:24:05] Boo
    [Sun Jan 31 17:24:07] Boo
    [Sun Jan 31 17:24:09] Boo
    [Sun Jan 31 17:24:11] Boo
    [Sun Jan 31 17:24:13] Boo
    [Sun Jan 31 17:24:15] Boo
    [Sun Jan 31 17:24:17] Boo
    [Sun Jan 31 17:24:19] Boo
    [Sun Jan 31 17:24:21] Boo
    [Sun Jan 31 17:24:23] Boo
    [Sun Jan 31 17:24:25] Boo
    [Sun Jan 31 17:24:27] Boo
    [Sun Jan 31 17:24:29] Boo
    [Sun Jan 31 17:24:31] Boo
    [Sun Jan 31 17:24:33] Boo
    [Sun Jan 31 17:24:35] Boo
    [Sun Jan 31 17:24:36] Boo
    [Sun Jan 31 17:24:38] Boo
    [Sun Jan 31 17:24:40] Boo
    [Sun Jan 31 17:24:42] Boo
    [Sun Jan 31 17:24:44] Boo
    [Sun Jan 31 17:24:46] Boo
    [Sun Jan 31 17:24:48] Boo
    [Sun Jan 31 17:24:50] Boo
    [Sun Jan 31 17:24:52] Boo
    [Sun Jan 31 17:24:54] Boo
    [Sun Jan 31 17:24:56] Boo
    [Sun Jan 31 17:24:58] Boo
    [Sun Jan 31 17:25:00] Boo
    [Sun Jan 31 17:25:02] Boo
    [Sun Jan 31 17:25:04] Boo
    [Sun Jan 31 17:25:06] Boo
    [Sun Jan 31 17:25:08] Boo
    [Sun Jan 31 17:25:10] Boo
    [Sun Jan 31 17:25:12] Boo
    [Sun Jan 31 17:25:14] Boo
    [Sun Jan 31 17:25:16] Boo
    [Sun Jan 31 17:25:18] Boo
    [Sun Jan 31 17:25:20] Boo
    [Sun Jan 31 17:25:22] Boo
    [Sun Jan 31 17:25:24] Boo
    [Sun Jan 31 17:25:26] Boo
    [Sun Jan 31 17:25:28] Boo
    [Sun Jan 31 17:25:30] Boo
    [Sun Jan 31 17:25:32] Boo
    [Sun Jan 31 17:25:34] Boo
    [Sun Jan 31 17:25:36] Boo
    [Sun Jan 31 17:25:38] Boo
    [Sun Jan 31 17:25:39] Boo
    [Sun Jan 31 17:25:41] Boo
    [Sun Jan 31 17:25:43] Boo
    [Sun Jan 31 17:25:45] Boo
    [Sun Jan 31 17:25:47] Boo
    [Sun Jan 31 17:25:49] Boo
    [Sun Jan 31 17:25:51] Boo
    [Sun Jan 31 17:25:53] Boo
    [Sun Jan 31 17:25:55] Boo
    [Sun Jan 31 17:25:57] Boo
    [Sun Jan 31 17:25:59] Boo
    [Sun Jan 31 17:26:01] Boo
    [Sun Jan 31 17:26:03] Boo
    [Sun Jan 31 17:26:05] Boo
    [Sun Jan 31 17:26:07] Boo
    [Sun Jan 31 17:26:09] Boo
    [Sun Jan 31 17:26:11] Boo
    [Sun Jan 31 17:26:13] Boo
    [Sun Jan 31 17:26:15] Boo
    [Sun Jan 31 17:26:17] Boo
    [Sun Jan 31 17:26:19] Boo
    [Sun Jan 31 17:26:21] Boo
    [Sun Jan 31 17:26:23] Boo
    [Sun Jan 31 17:26:25] Boo
    [Sun Jan 31 17:26:27] Boo
    [Sun Jan 31 17:26:29] Boo
    [Sun Jan 31 17:26:31] Boo
    [Sun Jan 31 17:26:33] Boo
    [Sun Jan 31 17:26:35] Boo
    [Sun Jan 31 17:26:37] Boo
    [Sun Jan 31 17:26:39] Boo
    [Sun Jan 31 17:26:41] Boo
    [Sun Jan 31 17:26:42] Boo
    [Sun Jan 31 17:26:44] Boo
    [Sun Jan 31 17:26:46] Boo
    [Sun Jan 31 17:26:48] Boo
    [Sun Jan 31 17:26:50] Boo
    [Sun Jan 31 17:26:52] Boo
    [Sun Jan 31 17:26:54] Boo
    [Sun Jan 31 17:26:56] Boo
    [Sun Jan 31 17:26:58] Boo
    [Sun Jan 31 17:27:00] Boo
    [Sun Jan 31 17:27:02] Boo
    [Sun Jan 31 17:27:04] Boo
    [Sun Jan 31 17:27:06] Boo
    [Sun Jan 31 17:27:08] Boo
    [Sun Jan 31 17:27:10] Boo
    

    [CCS 6.1 doesn't support hardware trace with a Segger J-Link, so no results for Segger J-Link with hardware trace analyzer enabled]

    The conclusion is that the problem appears to be in the emulation side rather than the MSP432 target, since:

    a) See the problem when using a XDS110, but not when using a Segger J-Link.

    b) When using the XDS110 enabling the Interrupt Profiling Hardware Trace Analyzer makes the problem occur more often. Enabling Interrupt Profiling means the XDS110 is having to pass SWO messages to the CCS debugger, and so if the problem is timing relating maybe the handling of the SWO messages causes the problem to occur more often.

  • Julian Kolodko said:
    I've cut down the application to the simplest example that still has the error.  The resulting project is attached as a zip file.

    I have created a simpler example of that, by using the MSP432 DriverLib  2_20_00_08 to create a non TI-RTOS example which has a RTC interrupt and main() calling printf() in a delay loop. This non TI-RTOS example only has the RTC interrupt active, whereas the TI-RTOS example also had timer interrupts.

    The non TI-RTOS example shows the same symptoms as the TI-RTOS example in that:

    a) Get "Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized" errors when using the MSP432 on-board XDS110 emulator, with a higher error rate when the Interrupt Profiler Hardware Analyzer is used.

    Example CCS CIO output when used the on-board XDS110 with Interrupt Profiler enabled:

    [CORTEX_M4_0] [Sun Jan 31 20:49:42] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:49:47] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:49:52] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:49:58] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:50:03] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:50:08] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:50:14] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:50:19] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:50:24] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:50:29] Test string
    Invalid CIO command (34) in the CIO buffer at address (0x20000818) was not recognized. Please check the device and program memory maps.
    [Sun Jan 31 20:50:34] Test string
    

    b) Don't get errors when using an external Segger J-Link emulator.

    This appears to rule out TI-RTOS from causing the CIO errors.

    The non TI-RTOS example is attached. MSP432_RTC_and_CIO.zip

  • G'Day Scott,

    Yes, I'm happy with this thread being moved.
    It does strongly appear to be a debugger issue.

    Thanks for your time and help.

    Cheers
    Julian
  • G'Day Chester,

    Thanks for your detailed look into this!
    I've tried the built in XDS110 and my external XDS200 and get the error with both.
    The numbers I see vary all over the place.

    So it looks like there is a real problem, that appears to be related to a bad interaction between the RTC interrupts and the emulator.

    What is the next step from here?

    Cheers
    Julian
  • I've moved the thread to the Code Composer Studio forum.
  • Julian Kolodko said:
    So it looks like there is a real problem, that appears to be related to a bad interaction between the RTC interrupts and the emulator.

    What is the next step from here?

    At the moment don't understand exactly what is causing the problem. Maybe if you enable Debug Server Logging and post the log file for a debugging session which has the invalid CIO command errors that will give more clues.

  • FYI, there is a known issue in the M4 driver that will cause issues with CIO.  A fix has already been made and will be included in the next TI Emulators release (should be March time frame).  The bug was introduced in the 6.0.83.0 release.  In this case, I tested the simplified MSP432 example (MSP432_RTC_and_CIO) posted above with the 6.0.83.1 and 6.0.14.5 releases.  6.0.83.1 showed CIO errors and 6.0.14.5 did not.  If you would like to revert to 6.0.14.5 you can use the standalone TI Emulators installer here (http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package).  I should note that 6.0.14.5 will trigger a firmware update if you have 6.0.83.1 already installed.  I did the update back and forth with no issue. This may or may not fix the problem but was something we had looked into internally not too long ago.

    Thanks,

    Mark

  • Mark Garrett1 said:
    FYI, there is a known issue in the M4 driver that will cause issues with CIO.  A fix has already been made and will be included in the next TI Emulators release (should be March time frame).  The bug was introduced in the 6.0.83.0 release.

    Thanks for the information.

    Can you confirm if the tracking number is SDSCM00052633 "CIO stops working on TDA2x and TDA3x devices"?

    I will wait for the fix and then try again.

  • Chester,

    Yep, SDSCM00052633 is the issue I was referring to.

    Thanks,

    Mark

  • Hello,

    Has this issue actually been resolved? I ask because I am encountering the exact same problem (invalid CIO command) under the similar circumstances (RTC interrupts enabled on MSP432) for a TI-RTOS project and it's causing some grief. If I disable the RTC interrupts, the problem disappears.

    I'm running what I believe is the latest version of CCS (6.1.2.00015) with all updates installed (including the recent emulator updates) on Linux Mint. The target is a custom MSP432 board and I'm using an XDS200 emulator. I also attempted to revert to the older version of the TI emulators (6.0.14.5) as suggested, but the behavior remained unchanged.

    Any advice would be greatly appreciated!

    Thanks,

    Ethan

  • I've just installed the latest updates for CCS which included TI Emulators v6.0.228.0.
    The CIO errors have now gone away.
  • Julian,

    Glad to hear the issue is resolved for you!

    If anyone else is still seeing issues after updating to TI Emulators 6.0.228.0, please let us know.

    Thanks,
    Mark