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.

CCS/TMDSCNCD28335: I/O freeze when the "Continuous Refresh" function of CCS[Debug] is unchecked

Part Number: TMDSCNCD28335

Tool/software: Code Composer Studio

Hi fellows,

An amazing behavior happens in my CCS project.

When the code is loaded and launched by the JTAG debugger with the "Continous Refresh" function checked, the inputs are tacken  into account, but very slowly (I mean in seconds).

But I unchecked this function during the run, the code does not react to inputs. The behavior is the same if the code is self-launched from power-up.

I would be very grateful if anyone could suggest any idea to understand this amazing behavior.

Regards.

HW :

CCS V8.3.1

JTAG : TMS320-XDS100V3+

DSC : TMDSCNCD28335

  • Corentin,

    Thanks for reaching out to us on the E2E.  Can you comment on the memory addresses that you are writing to that are the "inputs" to your code?  I assume this is what you meant, but if please correct this point if you meant a GPIO or physical pin input.

    Assuming these are memory locations/variables can you also include how you have cast them in your C source?  I'm not sure why continuous refresh would impact this, but if you have not declared the variables as "volatile" and there is no explicit code to change these the compiler will optimize out any "read" since it doesn't see any local modification.

    Best,
    Matthew

  • Matthew,

    Thanks for your question.

    Until now the code have 2 entries, a switch wired on GPIO63, and an analog input wired on ADCINB7.

    I use macros to ask the switch state :

    if (isRun_SWITCH)...

    #define isRun_SWITCH            (GpioDataRegs.GPBDAT.bit.GPIO63 == 1)

    (Actually there are 5 steps of #define between both statement)

    I use this code to the ADC input :

    float DCDC_Phase;

    interrupt void ISR-fun (void)

    {

    ...

        DCDC_Phase = OND3KW_GetMesRes(OND3KW_PIN_REF3)*OND3KW_GAIN_REF3;

    //macro definition : OND3KW_GetMesRes(OND3KW_PIN_REF3) --> *(&AdcMirror.ADCRESULT0 )

    }

    I hope I correctly answer your question.

  • Corentin,

    Thanks for this.  I know that the Gpio structures are defined as volatile, so that should make the compiler force a read.

    I assume this is the contention point, i.e. w/o continuous run the code doesn't enter the if statement, even if GPIO63 is high, correct?

    Would it be possible to change the macro statement to the following:

    if (isRun_SWITCH)... 

    to

    if (GpioDataRegs.GPBDAT.bit.GPIO63)

    This should do the same thing, since we are reading a single bit.  If it is high then you will enter the loop.  I think the current code is the same, just want to simplify a bit.

    If the above doesn't work I may ask you to send me the dis-assembly of the current "if" statement. 

    Best,

    Matthew

  • Matthew,

    I understand better my issue. My code is trapped in an interruption and asking for a variable with the JTAG recovers it for some periods where he can read the inputs.

    Thanks for your interest, I hope this post will help others.