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.

Could not connect to RM48 HDK anymore

Other Parts Discussed in Thread: HALCOGEN

Hi there,

I am using the RM48HDK with CCSv4.

First I generated my basic framework with Halcogen 2.11. After writing and downloading a simple program (switching on a LED) I can not connect to the HDK anymore. Instead the red error LED and both RGB LEDs are enlightened every time the board is powered again.

After a reset only the red LED is off. Neither CSS nor nowFlash can connect to the HDK.

Here are some screenshots:

Could anyone help me please?

Regards,

Gregor

  • Hi Gregor,

    I want to make sure the project your programmed to the flash is for RM48 rather than for TMS570. They use different endianess.

    One way you can try is to press/release the reset button while the norFlash is running "0x000 target..initialize..connect.."

    Regards,

    QJ

  • Hi QJ,

    thanks for replying that fast. The project properties are ok.

    Press/release the reset button while flashing with nowFlash did the job.

    Now CCS and nowFlash are working fine and I can have a lot of fun with my HDK.

    Thank you very very much QJ!

    Regards,

    Gregor

  • Hi there,

    the issue continues.

    After I have done the reset thing from QJ the first time I could debug my HDK 2 or 3 times via CCS.

    Then the same failure showed up again. The reset thing still works, so I can erase the flash via nowFlash and start then a debug session with CCS.

    The problem is now that the program is freezing at _c_int00(). 

    void _c_int00()
    {

    /* Enable VFP Unit */
    _coreEnableVfp_();

    /* Initialize Core Registers */
    _coreInitRegisters_();
    ...}
    
    

    At first CCS freezes in the row where _coreEnableVfp_() is called.

    So I commented it out quickly.

    After this CCS freezes in the row where _coreInitRegisters_() is called.

    
    

    So, is my sys_startup.c file corrupt or what can I do???

    Regards,

    Gregor

    EDIT:

    I tried the LED_blinky_example from your wiki page. This one is working fine, absolutely no freezing.

    So, what is wrong with my application?

  • Hi Gregor,

    What do you mean CCS freeze? If you are able to Stop the code running(Press the Pause button in your snapshot) and figure where the code got stuck, I think it is not CCS Freeze.

    I have couple of suggestion see whether it helps

    1) In HALCoGen do not select "TMS570LS3137ZWT-->Cortex-R4F-->Enble Vectored Floating Point Unit " If you are really not using FPU. By doing so _coreEnableVfp_(); will not be called and there are portion of FPU intialization done in "_coreInitRegisters_();" which will be removed.

    2) If still the code gets stuck, please check your Build options, Check the runtime support Library is selected as " rtsv7R4_T_be_v3D16_eabi.lib"

    3) If you are building the project as release, try changing to Debug to see if the problem persists.

    Please get back to us with your finding..

    Best Regards
    Prathap

  • Hi Prathap,

    CCS does not freeze. The code freezes. The eradication of the code stops at exactly the point I showed you in my picture.

    If I am pressing the pause button, I am getting the same error notification as shown in my first post.

    1) This does not help. Lately it is the same as commenting the line out. Then the eradication stops at the next line.

    2) I think this library should be selected. I could not check it right now, because I am abroad.

    3) Debug is definitely selected.

    Regards,

    Gregor

  • Hi Gregor,

    Is it possible for you to send your PJT files(Source + CCS file) to help you better.

    -Prathap

  • Hi Prathap,

    I regenerated my complete project with the new Halcogen 3.0 and suddenly everything works pretty fine.

    Thanks anyway with carrying about me.

    Regards,

    Gregor

  • Hi folks,

    I believe the story is not over yet. After editing and recompiling my project in Halcogen, I am getting the same issue all over again.

    And by now I am getting a little angry about my non-working code.

    This time I added my project, which does not work. Hopefully you could help me with this data.

    1256.hugo.rar

    Regards,

    Gregor

  • Hi Gregor,

    I could not reproduce the error you are facing. Just couple of questions so that I can reproduce here

    1) Did the code execution failed the very first after you Programmed? or after doing Single step / debugging you tried to rerun by doing restart or CPU reset?

    2) Did you try to do run-->restart in the debugger?

    3) Once it failed, were you able to reprogram with out power on reset / unplugging the USB

    4) Have you tried doing System reset run-->reset--> system reset.

    I programmed your code and looped it back to run from beginning by editting it as given below, it worked all the time.

    I am guess it could be debugger issue that you are facing, by reducing the TCLK using CCS might help. I have asked few experts comments on this, I will update as soon as I get some answers.

    ################################################################

    /* Include Files */

    #include "sys_common.h"
    #include "system.h"

    /* USER CODE BEGIN (1) */
    #include "het.h"
    #include "rti.h"
    #include "servo.h"

    asm(" .ref _c_int00");
    /* USER CODE END */

    /** @fn void main(void)
    *   @brief Application main function
    *   @note This function is empty by default.
    *
    *   This function is called after startup.
    *   The user can use this function to implement the application.
    */

    /* USER CODE BEGIN (2) */
    /* Global variables of all used servos */
    extern servo_t baseServo;
    extern servo_t shoulderServo;
    extern servo_t elbowServo;

    uint8_t actTick = 0;
    uint8_t ticks = 15;

    /* USER CODE END */

    uint8_t  emacAddress[6]  =  {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
    uint32_t  emacPhyAddress = 0;

    void main(void)
    {
    /* USER CODE BEGIN (3) */
     /* Variables */
     int i;
     servo_t *baseServo_p;
     baseServo_p = &baseServo;
     /* Initialization of all drivers */
     rtiInit();
     hetInit();
     servosInit();
     
     /* Enable global interrupts */
     _enable_interrupts();
     
     /* Setup NHET[0] to output and low */
     hetREG1->DIR    = 0xA8178035;
     hetREG1->DOUT   = 0x0;
     for(i=0;i<0xFFFFF;i++);
     hetREG1->DOUT   = 0xFFFFFFFF;
     for(i=0;i<0xFFFFF;i++);
     hetREG1->DOUT   = 0x0;
     for(i=0;i<0xFFFFF;i++);
     hetREG1->DOUT   = 0xFFFFFFFF;
     asm (" b   _c_int00");
     while(1);
    }

     

  • Hi Prathap,

    1) The code execution did not fail at the very first time. At the very first time I could program and debug my hardware 2 or 3 times.

    2) Unfortunately this option is disabled.

    3) No. Once it failed the next time I am trying to debug my hardware the screen of post #1 appears.

    4) WTF??? Just now I tried my project with the same configuration as I have sent it to you. As result I got a stop of the code execution at exactly the point as described. After hitting target-->reset-->system reset the execution continues with the main(). So, where is the issue? Does this mean that I have the reset my system every time I am getting my code stuck? Subsequently I tried exactly the same code another time and the execution works fine, without any freeze or reset. But after editing my code and testing it again this way does not work anymore. The code kept stuck at _c_int00().

    Regards,

    Gregor

  • Hi Gregor,

    Sorry for the delayed response, Can you please replace the RWAIT value( replace value 4 with 3)  that is generated by HALCoGen at 180MHz PLL output.

         /** - Setup flash read mode, address wait states and data wait states */
        flashWREG->FRDCNTL =  0x00000000U
                           | (4U << 8U) replace this to --> | (3U << 8U)
                           | (1U << 4U)
                           |  1U;

    Can you please let me know with this change..

     

  • Hi Prathap,

    your change seems to work. My application is running.

    For now I am going to verify your answer. But I have to observe this for my further development.

    So, thank you very much for your help!

    Regards,

    Gregor