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.

LAUNCHXL-F280025C: C2000 how to remove running non-debug program and run a debug flash?

Part Number: LAUNCHXL-F280025C
Other Parts Discussed in Thread: C2000WARE, DRV8323

C28xx_CPU1: Trouble Reading Register PC: (Error -1142 @ 0x0).   Trying to remove a running program that is non-debug, and replace with debug flash module.  How to remove running program?  or??   Using CC 12.7.0.00007 and C2000Ware_MotorControl_SDK_5_01_00_00.  New to the C2000 code.

thank you

Al Lehman

  • Hello,

    Can you show the full error message from the CCS console?

  • Yes, thank you.  CC Debug loading flash_lib_DRV8323RS_3SC and then clicking on real-time CCicons. CC asks Do you want to enable realtime mode?
    "Can't enter realtime mode unless debug events are enabled.
    Bit 1 of ST1 must be 0.
    (Emulation package 12.7.0.00105)"

    then I resume and...

    "Trouble Reading Register PC:
    (Error -1142 @ 0x0)
    Device blocked debug access because it is currently executing non-debuggable code. Choose 'Rude Retry' to disable polite mode and force the operation.
    (Emulation package 12.7.0.00105)"

    I hit rude retry but the "expressions" table does not update and the data is not correct.

    Another way that works is to not hit the CC real-time icons and then it works.

    I appreciate your time.  when I used CC rev v11 this all worked so I'm not linking properly or ?????.

    thank you

    Al Lehman

  • Please provide screenshots, writing down the errors in text here is a little bit confusing. Also, can you clarify what you mean by clicking on real-time icons/realtime mode?

  • Note the real-time icons are selected below, the two clock icons 

    after selecting yes

    selecting rude retry does not do anything after "resume".

    If I don't select the realtime two icons, then the "expressions" table works and the motor runs.

    I want to know why this first errors occur so I don't have to deal with that everytime.  

    thank you

    let me know what else you need.

    Al Lehman

  • Hello,

    The second error is likely due to your application in a critical section when you tried to explicitly enable real-time mode.

    clicking on real-time CCicons

    Which icons are these? I assume you are referring to the "continuous refresh" icons in various views. Real-time memory access for these should be enabled by default, without the need to explicitly enable real-time mode. Hence I am confused why you got a prompt.

    ki

  • Ki - I'm referring to the two icons right below the "Window" word below.  these enable real-time.  thanx  Al  

  • Yes those are the standard real-time icons.

    You should not have to explicitly enable them to to get real-time memory and register access. What is the reason you were trying to enable it?

    Trying to remove a running program that is non-debug, and replace with debug flash module.  How to remove running program?

    Can you clarify what exactly you are trying to do? Did you flash a program and now trying to replace that program with another? Can you calrify?

  • KI - thanks for getting back to me.

    CC 10 and 11 directions  for the motor DKs always had you selecting the real-time icon to enable some realtime views. 

    process:  use debug build-load icon..  loads fine.  in CC10 and 11 next step would be to select realtime icon and answer a yes/no screen.  

    When I press realtime icon I get the sequence of screens in the first part of my post.   

    I'm just trying to understand why the error occurs.  seems to me CC12 should be the same as 10,11.  I try changing ST1, bit1 to zero but it immediately goes back to a 1.  expressions view DOES NOT SHOW ANY VALUES..   different than before OR I did a sequence that is causing  this OR  product changed.  

    I did load a compiled version from the universal_motorcontrol_lab_F28002x, which was not a flash.  Before that the realtime icon worked.  after that it is as above.

    I am asking how to clear the issue so that the debug DRV8323 flash version will not encounter this error.

    Thank you

    Al

  • I'm just trying to understand why the error occurs.  seems to me CC12 should be the same as 10,11.

    Yes the behavior should be the same. The includes polite real-time memory accesses being enabled by default without the need for explicitly enabling real-time mode (pressing the icon). In CCS 10/11, if you did not press these icons, you were not able to get any real-time memory accesses?

    I did load a compiled version from the universal_motorcontrol_lab_F28002x, which was not a flash.  Before that the realtime icon worked.  after that it is as above.

    Sorry, but I didn't quite understand the above. Is the above comment saying that for the example above, CCS10/11 real-time access worked when the icon was pressed for CCS12, it did not?

  • KI - CC12 realtime icon worked with no notices or problems UNTIL I loaded a non debug program.  after that realtime icon gave the errors shown at the beginning of this E2E.   How do I clear the issue??  so that realtime icon works without errors??  

    thank you

    Al

  • A few things:

    Are you able to get real-time memory and register updates without pressing any of the real-time icons? This should be possible.

    As for the error when pressing the icon - can you try erasing all of flash and then try again? I actually reproduced the error on my F280039C using the universal_motorcontrol_lab example for that device. But then it went away. I think power cycle and erasing of the flash helped.