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/LAUNCHXL2-570LC43: DSS, CCS program and writing/reading register values

Part Number: LAUNCHXL2-570LC43

Tool/software: Code Composer Studio

Good day, i have a laucnxl2-570lc43 and im trying to organize an data exchange beetwen lauchpad and my pc through DSS (Debug server scripting).  (The idea is: debugSession.writeReg(val,"registerName") -> launchpad reads it and then write onto the another register -> dss.readRegister("registerToReadName") - reads the data from the second register, its all in the infinite loop here and there)

I found some registers, wrote the values in them, but launchpad just dont read them. the code i wrote tells me it is just like the dss doesnt do changes in registers (i know that it does, cuz when i write registers via dss and them read them via dss as well the values changes).

when i changed the flash memory to test if it is possible to write a and read registers by the launchpad itself, it all worked. (that tells me that my code realy reads registers values).

the part of the code in ccs is like:

while(int i==0){

i=registerRead(); // because the value in the register is always 0 at the start

}

So this code just dont react to the dss and it always in the cycle when i use debugSession.writeRegister()

Can you help me?

  • Hello,

    If I understand correctly:

    -DSS script writes value to register

    -Code on launchpad reads it and then writes a value to second register

    -DSS script reads second register

    What you are trying to do should work. What are the registers? 

    Roman Kosiy said:
    I found some registers, wrote the values in them, but launchpad just dont read them. the code i wrote tells me it is just like the dss doesnt do changes in registers

    How did you validate this? Did you get any error or is your launchpad code returning a register value different than what the DSS script set it to?

    A small, reproducible test case would also be helpful. Also please specify which CCS version you are using

    Thanks

    ki 

  • - DSS writes value, yes (and reads as well. when i write and than read this exact reg, the values are the same)

    - Code on lauchpad doesnt reads the value written by dss.

    - DSS writes and reads both registers.

    Code on the lauchpad writes and registers but only if i changed their values in the code composer code(i tested it).... and reads them

    but code in the lauchpad doesnt react to the registerchanges when i change values via DSS.


    How the code should work: first, dss reads reg1,prints val, then i write reg writeRegister(reg2,val); the code in lauchpad should read this reg2, exit this infinite loop

    while(int i==0){ i=registerRead(reg2); // because the value in the register is always 0 at the start }

    and write this val to reg1. then the loop in dss starts again and dss reads reg1 again.

    But the problem is value in reg1 read through dss is always 0. that mean that lauchpad sees val at reg2 as 0 and its always in the loop written above.

    I use CCSv7
    Thanks for response :)

  • Can you provide your DSS script and also your example project for the application running on the target. Both can be a stripped down version of the originals (actually that is preferred), as long as the issue can be reproduced.

    Note that it is holiday season here, with many out of the office on holiday (including myself), hence I apologize in advance for slower than usual responses on the forum

    Thanks
    ki
  • Ki-Soo Lee said:


    Note that it is holiday season here, with many out of the office on holiday (including myself), hence I apologize in advance for slower than usual responses on the forum



    I understand, no problem, sorry for disturbing this period of time :)

    Ki-Soo Lee said:


    Can you provide your DSS script and also your example project for the application running on the target. Both can be a stripped down version of the originals (actually that is preferred), as long as the issue can be reproduced.

    DSS and CCS  code (using java, zero exceptions or errors)

    (cant load the text code, forum errm thats why i'll use images)




     

    The output of the program is: 

    Got data from a launchPad 999

    Value 326 has been written to a L2ramw_AddrVectTstReg

    Got data from a launchPad 999

    Value 514 has been written to a L2ramw_AddrVectTstReg

    Adress of the second register and his name is correct, i checked it

  • waiting for reply, just to make sure)

  • Solved.

    What solved my issue was closing debugSession every time i  need changes to be saved.

    while(true)
    {

    debugSession.target.connect();

    debugSession.memory.readData(0, readBufferReg, 32);
    debugSession.memory.writeWord(0, writeBufferReg, randomValue);

    debugSession.target.disconnect();
     Thread.sleep(1000);
    }

    As far as i understand opening debugSession stops execution the  launchpad's algoritm.