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-F28P55X: LAUNCHXL-F28P55X sample code hangs in bool SysCtl_setClock(uint32_t config)

Part Number: LAUNCHXL-F28P55X
Other Parts Discussed in Thread: SYSCONFIG, , C2000WARE

Dear Sir/Ma,

Good afternoon.

I have a very strange experience with a new launch pad.  

Codes do not run to the while(1) after initialization.  The code get stucked in SysCtl_setClock(uint32_t config).  I find this very strange.

I also tried the gpio_ex2_toggle example and the code does not run into the 

    //
    // Loop.
    //
    for(;;)
    {
        GPIO_togglePin(myGPIOOutput0);
        DEVICE_DELAY_US(1000000);
    }
 
It also get stucks at the SysCtl_setClock(uint32_t config).
 
Please what can be the problem.  This problem is slowing down my work.
 
I have checked the settings of the launchpad and every thing looks okay, but the code does not work.  What can be the problem.  How can I resolve it?
 
Thanks.
 
Babatola Abayomi
 
 
  • Hi Abayomi,

    In the debug panel, in the threads tab, it will mention where the issue is exactly. Please look into that.

    What is the clock source within SysConfig ClockTree Tool? The LaunchPad supports INTOSC1/2 and XTAL clock sources.

    Best Regards,

    Aishwarya

  • HI,

    Thanks for the quick response.

    I am running the gpio_ex2_toggle example from the C200ware version 6

    A snapshot of the debug window is included below:

    The software I am writing also have this problem.  However, I have only one Lunchpad that behaves well and does not get stuck with this point.  The others have this probelm or jsut suddenly stop working

    When I click on comtinue the programme remain stucked there

    Thanks

  • Abayomi,

    Do you see this issue with other examples? I was not able to replicate this issue on my end. Let me check in with the team if they've seen anything like this too.

    Best Regards,

    Aishwarya

  • Abayomi,

    Let me know once you're able to pin-point exactly where the device is hanging/failing. 

    Which REV LaunchPad is being used? If using REV0, you will need to add REVID_REV0 in the predfined symbols, or else the device_cal function will fail. More information in sysctl.h.

    Best Regards,

    Aishwarya

  • hi,

    Thank you for the reply.  

    I have checked the launchpad. The launchpad is a MCU133A version and the number is CL55240800021.  Is this a REV0 type.?

    I included the REVID_REV0 but the launchpad still has the same problem and hangs without stoping when I run it.

    Without the REVID_REV0, the cod does not run to the for (;;) loop and when I click on the stop button, stops at the position indicated in the snapshot I previously posted.

    At time it stops in the SysCtl_setClock(uint32_t config). 

    I presume the C2000 example configured the  SysConfig ClockTree  well?  The XTAL Frequency (in MHz)  is configured for 10 MHz.

    Please what can be the problem.

    Thanks

  • Abayomi,

    MCU133A refers to CC built with Rev 0 Silicon, so you will definitely need the REVID_REV0 in your program. If I'm understanding correctly, after adding the predefined symbols, you're able to run to the for(;;), but it is still pausing at the SysCtl_setClock(uint32_t config). 

    I'm going to have to look at this further and get back to you.

    Best Regards,

    Aishwarya

  • Hi,

    Thanks you for the reply.  I have tried the suggestions but the launchpad still get stuked at start up and does not run to the while (1).  The results of the suggestions are below

    1. When I include the REVID_REV0 the code did not link as there was no symbol for device_cal error.  That means that is not the solution.

    2.  I included the internal pull ups on the gpio35 and gpio37 in the code through the sysconfig but the problem is still there.

    What can I still do?.  The problem is dragging my  project back.

    Thanks.

  • Abayomi,

    1. When I include the REVID_REV0 the code did not link as there was no symbol for device_cal error.  That means that is not the solution.

    For MCU133A version, you must use this predefined symbol. Please rebuild the project, not just build the project LAUNCHXL-F28P55X: CPU crash when calling device_call function

    2.  I included the internal pull ups on the gpio35 and gpio37 in the code through the sysconfig but the problem is still there.

    This is not needed.

    Best Regards,

    Aishwarya

  • Hi,

    Wishing you  a happy new year.

    I have tried the options but the problem is still there.

    I included internal push up the problem still persisted.  I remove the internal pull ups and added external pull ups resistors.  But the problem still persisted.

    What can be done.  

    Can I return the kits?

    Thanks

  • Abayomi,

    Happy New Year! When the INTOSC2 clock source is selected, does the code work as expected?

    After confirming this, could you send me the example project you are using, so I can try it once? 

    Best Regards,

    Aishwarya

  • Thanks.

    I would try that and get back to you.

    Thanks

  • HI,

    Sorry for the late reply.  I was busy with some other task.

    I tried the suggestion but the result was negative.  The code just initialises and does not enter the while(1) loop.

    I am really worried because I have 6  Launch pad of this variant and only one is working.  This for me is completely strange.

    The TI sample code I used to test the launch pad is below:

    gpio_ex2_toggle.rar

    Which other options do I have.

    Thanks

  • Hi Abayomi,

    I'm going to loop in our F28P55x LaunchPad expert to further look into this.

    Best Regards,

    Aishwarya

  • Hi Abayomi,

    Could you confirm which version of silicon is on your LaunchPad that is working and what is on the ones that do not work, please? You would verify that by reading the MCU part number. If it starts with X or TMX it is Rev0 version, if it starts with TMS it is REVA version.

  • Hello Stevan,

    Thank you for your reply.  

    The markings on the microcontrollers are below.

    The not functining microcontrollers 

    1. XF28P559
       SJ9P2Q
       3L - 42A1x6w
      G4


    2.  XF28P550 (x2)
         SJ9PZ
        3L - 41AY65W
        G4

    3. F28P550
        SJ9PZ
        3L A - 53CC2SW
        G4

    4. numbers are nor readable

    The details of the only good LP is below:

    1. F28P550
        SJ9PZ
       3L A - 48C185W
      G4

    I look forward to a favourable reply from you.

    Thanks

  • Abayomi,

    All MCUs that start with "X" such as XF28P550 are revision 0, REV0. Therefore, in your predefined symbol you need to add REV_ID = 1 or REVID_REV0, either works. 

    If you use F28P550 then it is REVA version. It should be set by default, but in case it does not work you could predefine REV_ID = 2 or REVID_REVA to be safe. Once you compile the project, please use "step over" feature in CCS and make sure that code steps over Device_init() function in main(). If it does not step over to the next line, the issue is still with REVID definitions. 

    Please let me know it works for you. 

  • Hi,

    Thank you for your reply.

    I tried the fix but the result was mixed.

    i.  Two LPs responded to REV_ID = 2.  The toggle gpio example blinked the LED when I set the toggle example gpio pin to 20.  However, when I try to run the example without debug mode the LED does not blink.  This is abnormal

    ii.  The others did not respond.

    I need a clarification.  By REVID_REVA, you mean I should REVID_REVA = 2 ?

    Thanks and I await your reply.

  • Hello,

    You can just add REVID_REVA (REVID =2) or REVID_REV0 (REVID = 1) based on silicon on your board. REVID_REVA is set by default. 

  • Hi,

    Thanks.

    REVID=1 and REVID=2 does not allow the code to build. The snapshot is below:

    REVID_REVA  builds but the code does not run.  It just hangs.

    REVID_REV0  The code does not build.  The snapshot is below:

    What else can I do.  

    Am I to buy new launch pads.

    Thanks

  • Hello,

    Do you have any F28P55x control card to verify by any chance? Which CCS version are you using and are you running from RAM or FLASH? I will look for LAUNCHXL-F28P55X in meantime to see if I can replicate the issue. Thank you for your patience.

  • Hello,

    I found a LAUNCHXL-F28P55X with XF28P559SJ silicon it. I did not add anything in my predefined symbol, and it did not get stuck in either RAM or FLASH.

    Please try running your code in FLASH to see if anything changes. Please try doing without adding predefines.

  • I have tried every thing I can including the above suggestion but it did not work

  • Hi,

    Which C2000Ware version are you using?

  • Hi Abayomi,

    After further review, the problem could potentially underlie in the mismatch between CLK source hardware and software configuration. Could you let me know if the LaunchPad is set to use XTAL or INTOSC?  By default, the Launchpad uses an on-board crystal oscillator, Y2. If R32 and R33 are populated with 0-ohm resistors then XTAL is selected. If R36/37 are populated, then INTOSC is chosen. Please refer to the User's guide 2.1.3.7 X1/X2 Routing: https://www.ti.com/lit/ug/sprujc0a/sprujc0a.pdf

    In addition, are you using ClockTree tool to set up your clock source or device.h? Whatever is selected in software has to match hardware and REVI_ID number to avoid issue you have. 

  • R36/R37 are not populated.

    R32 and R33 are populated with 0-ohms resistors.

    The clock tree tool of the sys config is used.

    I once again looked at the problem but the problem is still the same.

    I tried the 3 clock sources (Intosc1, Intosc2 and xtal_or_x1) but the result is the same.

    I tried  if on C200ware6_00_00, C2000Ware_6_001 and C2000Ware_26_00_00 and sysconfig 1.27 but the code still did not run

    What next am I to do?

  • Hello Aboyami,

    Thank you for sharing. You are using crystal default configuration. Would you mind sharing syscfg file, so I could check on my side?

  • hi,

    the sample TI  project sysconfig file am using is below

    4263.gpio_ex2_toggle.rar

    This is actually an example from TI.

    The entire project example is below:

    4263.gpio_ex2_toggle.rar

    I shall be grateful if the issue is resolved this week.

    Thanks

  • Hello,

    I took a look at your files. Both of them are just showing syscfg configuration. It seems that ClockTree has X1 set up instead of XTAL at very beginning. Could you share the whole project so I can run it on my side, please?

  • Hello Stevan,

    Sorry for the break.  I just picked up the task again.

    I looked at it from all directions

    The probelm with the clock hanging is not there again.  I am not sure why, It could be with the software tools version.  But there is another problem.  The CPU timer0 does not work properlly

    I configured CPU timer0 for the system time base.  But the interrupt attached to the timer is only called once and without this interrupt the code flow is distrupted.

    When I start my device in debug mode.  The timer ISR only fires once then no more.  But if I restart the session, the timer works well and the entire system comes alive.  So when I start the LP in a standalone mode, nothing works.

    This behaviour is strange.  How can I resolve this.

    The versions of the software I am using are below:

    sysconfig - 1.27
    c2000ware - 6.0.1.00
    TI v22.6.2.LTS

    Thanks

  • Hi,

    The subject matter is expert is out of Office. Please expect the response by Tuesday
    Thanks

    Srikanth

  • Hello Abayomi,

    Before diving in, I have couple of questions:

    • When you say "the clock hanging problem is not there again," did it resolve on its own after updating tools, or did you make a specific change?
    • Does your code get passed Device_init() function when stepping over?
    • When the timer ISR doesn't fire after the first time, does your program hang, continue running the main loop without timer ticks, or reset?

    For CPU_timer0 make sure to clear the PIE group acknowledgment flag to allow subsequent interrupts. If this call is missing, the timer keeps running but the interrupt is permanently blocked after the first trigger.

    __interrupt void cpuTimer0ISR(void)
    {
    // Your timer handling code here...

    // CRITICAL: Acknowledge the PIE group to allow the next interrupt
    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
    }

    Also did you configure your timer and interrupt in Syscfg or in code files?

  • Hi,

    Thanks for the reply.

    i.  I think the problem with the clock hanging has to do with the C2000 resources litk a mis match of the compiler or the C2000ware or the sysconfig.

    ii. Yes the code executes the Device_init()

    iii.  The interrupt_clearACKGroup is executed in the Timer0ISR.

    I ran my code on the lunchpad and the problem is still there.

    The Timer0ISR does not run in standalone mode.  It only runs in debug mode after i  stop the debug and restart it.

    Thanks

  • Hello Abayomi,

    Please try using C2000Ware 5.05.00.00 version and check if error retains.