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.

TMS320F28P650DK: Reading of incorrect values

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: C2000WARE

Hi Experts,

while running pdi_hal example we are facing some register read related issues linked to optimization problem.

(Project : "C:\ti\c2000\C2000Ware_6_00_01_00\libraries\communications\Ethercat\f28p65x\examples\f28p65x_cpu1_pdi_hal_test_app" )



We found where the issue might be coming from and needed help to clarify and solve it further.


File : ethercat_subdevice_cpu1_hal.c
In "ESC_loadedCheckEEPROM" function we added breakpoint on line 921 and line 922 , when we use breakpoints to run we receive correct value 22037 but without breakpoint we are not getting correct value. We checked variables having "volatile" keyword. 
We are checking for esc_dlo_status1 value in watch window.

image.png

image.png

image.png
Attaching asm files for both optimization


o2_ethercat_subdevice_cpu1_hal.asm
Can you please help in solving this issue ? Why are we are not getting value correctly when breakpoints are added vs when we didnt add breakpoint . What should be changed to get the values properly without adding breakpoints ?

  • Hello,

    when we use breakpoints to run we receive correct value 22037 but without breakpoint we are not getting correct value.

    What is the "without breakpoint" scenario? Do you mean when the target is left running and continuous refresh is being used?

    Please provide the CCS version being used.

    while running pdi_hal example we are facing some register read related issues linked to optimization problem.

    (Project : "C:\ti\c2000\C2000Ware_6_00_01_00\libraries\communications\Ethercat\f28p65x\examples\f28p65x_cpu1_pdi_hal_test_app" )

    Are you using the example "as-is" or did you modify (optimize) in any way?

    Thanks

    ki

  • Hi ,
    Thanks for your reply 
    ccs version being used : 20.4.1.4__1.10.1
    yes without breakpoint means its being left running continuously


    I guess that was hardware taking time to settle , thanks for your reply.

    But i had one more question:

    I had declared

     volatile uint16_t status2;
    #define ESC_EEPROM_STATUS_EEPROMLOAD_M 0x1000U
    #define ESC_EEPROM_SUCCESS    0x0U
    When I am adding no op instruction in else part its going into line "return (esc_eeprom_success , screenshot 2 "after condition check , otherwise without no op its going into its going to line ("esc_eeprom_load_error" , screenshot 1) . Can you help me clarify. If everything is correct with or without no op it should go to line with ("return esc_eeprom_sucess") statement. (check_status3 is added to watch expression for debugging.)







    Similar to e2e , TMS320F28034: f28034, the program takes the wrong branch/path - C2000Tm︎ microcontrollers - INTERNAL forum - C2000Tm︎ microcontrollers - INTERNAL - TI E2E support forums 
    Can you please help me understand this behaviour?

    I have created a simple program with only those statements for reference and attached, same behaviour is observed :
    device : f28p65x launchpad
    optimization : 2

    5504.led_ex1_blinky.zip

  • Also please suggest way of solving the issue without nop or delay.

    (Found this explanation using llm)

  • 5504.led_ex1_blinky.zip

    This example does not seem to apply to the example for the reading the values when halted vs real-time mode. Can yo provide your example for that one.

    But i had one more question:

    As for your other question, please create a new thread for this question since it is a different issue and may need to be investigated my someone else.

    Thanks

    ki

  • ok this thread then can be marked as closed. As i said reading values related to halted vs realtime mode was linked to hardware taking time , not issue from software. Thanks for your support.