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.

RM48L952: Checking N2HET flags

Part Number: RM48L952

Is there a way to check the N2HET flags that get set during execution of instructions in code composer?

For example, I have a branch condition that is dependent on the Zero flag being set, which, as far as I know, should be set via the previous 'ADD' instruction that I have setup, however, the condition is not being satisfied.  

I have read over SPNU503C and it looks as though the flag should be set if the intermediate result register ( IR1 ) is zero (which it is, as the summation into IR1 involves ZERO and an empty data field).  If I can't see the flags during debugging with CCS, is there a different way to go about debugging the instructions/flags?

Hope this makes sense.

Best,

-Nate

  • Nathan,

    The best way to debug HET programs is to use the HET IDE. You can download it here: http://www.ti.com/tool/HET_IDE

    The GUI allows you to view the states of all internal registers as well as the registers that are accessible via the host CPU's memory map.

    Regards,
    Sunil
  • Thank you Sunil for the response,

    I will surely give that a try in time, however, since I've only added a few instructions to the end of the het1PROGRAM array in the 'het.c' file, I was hoping to keep this black box, and not turn to a white box solution (mainly because I think it might be overkill for my situation).

    Is there any reason as to why the zero flag would not be set after an ADD instruction with both sources being zero?? I know the ADD instruction is indeed executing, and I know that the branch BR instruction is executing directly after it, but for some reason the 'zero flag being set' condition is never obtained. Are there any other insights before I turn to the whitebox solution via IDE?

    thanks,
    -Nate

  • Nate,

    How do you know that the ADD instruction is certainly executed? I would check the following:
    - What is the loop resolution period?
    - How many HET instructions can be executed in this time?
    - Did the loop resolution period get exceeded when the "few instructions" were added at the end of the HET program?

    Regards,
    Sunil
  • - Loop resolution period = 800 ns
    - HR prescale = 1, LR prescale = 64; so Time slots available (ts) = 1 x 64 = 64 instructions (I currently have 60)
    - As far as I know, the loop resolution period is not being exceeded, as it says per the RM48 TRM: " the currently executing N2HET program
    sequence is interrupted and restarted at N2HETaddress 0 " but I can see that the last instruction is indeed executed as it's data field is updated in memory
  • Nate,

    Some HET instructions take more than 1 cycle to execute, so you may be cutting it real close with 64 cycles for 60 instructions. You can try this: after the code has loaded the HET program into the HET RAM (usually a memcpy routine) and before the code turns the HET ON, overwrite the data field of the ADD instruction with a non-zero value using the debugger. Then after the HET program executes, you can see if the correct result of the ADD instruction gets written to its data field.

    Regards,
    Sunil
  • Sunil,

    Thank you for the suggestion. I will try it out later this week!

    Updates to follow...

    Best,
    -Nate Jones
  • Hi Nate,

    I am closing this "ticket" for lack of activity in more than two weeks. Please reopen the thread if you need specific information.

    Regards,
    Sunil