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.

"Demo" example code for AM335x EVM

Hi,

Our customer is evaluating AM335x EVM now.

They are using "Demo" program on AM335xEVM with XDS560 JTAG debugger.

When they restart the "Demo" program after runnig "demo" program once, "demo" program will stop at the below code.

while statement in demoPwrMgmnt.c ( Line 448)

void waitForM3Txevent(void)
{
   /* wait until CM3 TX Event is generated */
   while(!isM3IntReceived);

Does anyone know why "demo" program will stop in here when restarting?

Best regards,

Michi

  • Michi,

             When you say "restart" - are you pressing restart in debugger? or reloading the demo application again?

             in the first case it may not work as the data section will not be reinitialized.

    Regards

    Baskaran

  • Dear Baskaran-san,

    Thank you for your reply.

    Our customer is reloading the demo application, not restart button of CCS debug mode.

    In this case also, isnt data secion reinitialized?  Other example code "adcVoltMeasure" can restart by reloading application code.

    By the way, what is M3 device? What is doing "while sentence of M3"?

    Best regards,

    Michi

     

  • Michi,

               In AM335x Cortex-M3 is used for entering and exiting from sleep mode. So there need to be sync between MPU (A8) and M3. the StarterWare Demo example integrates Power management with it.

               I guess when you reload the binary, seems M3 is in different state and not responding to A8 command. If you are not interested in power management you can comment this statement.

    Regards

    Baskaran

  • Baskaran,

    I am experiencing this same behavior with starterware v2.00.01.01.  Even if I add code to properly reset the CM3 before reloading it, the demo cannot be run a second time from CCS unless you cycle power on the EVM and reload the application.  This should not happen as it makes the demo extremely difficult to debug.  Can this example be enhanced in a future release such that an end user can restart and rerun the applicatoin from within CCS without having to cycle power?

    Ruben

  • Ruben,

              I hope you are doing "System reset" in CCS and reloading the binary. Just resetting the PC may not work as the data variables and HW will be in different state.

    Regards

    Baskaran

  • Baskaran,

    The only oher way I have been able to restart consistently is to do the folllowing:

    1. 'Run->Reset->System Reset'
    2. Halt the processor. Needed because step 1 leaves CPU in running state.
    3. 'Scripts->AM335x System Initializatoin->AM335x EVM Initializatoin.' Needed because step 1 leaves DDR non-functional. 
    4. 'Run->Load->Reload Program'

    This procedure enables the demo program to run consistenly, but the time to execute these steps is about 5 minutes with an xds100v2 emulator.  This makes debugging the application extremely difficult.  It should be possible to restart the program using CCS 'Run->Restart' without having to go through all of the above steps.

    This was tested with CCSv5.4.0.00091, starterware v2.00.01.01, AM335x EVM v1.5A, and xds100v2 JTAG emulator.

    Thanks,

    Ruben

    Baskaran Chidambaram said:

              I hope you are doing "System reset" in CCS and reloading the binary. Just resetting the PC may not work as the data variables and HW will be in different state.

  • Hi,

             In StarterWare the projects are build with "--ram_model" linker option. This means that the data section will be initialized at load time. So unless the image is reloaded the data variables will not have the expected initial value and the program may not work as expected. This has the advantage of lesser init time when booted from NVM.

             The other way to get it working with reset is to use "--rom_model" linker option while building the application. This will initialize the variables at run time. But StarterWare startup code need to be modified to accommodate this.

    Regards

    Baskaran