TM4C1290NCZAD: Unable to re-program the board after loading the firmware with configuration of MAIN OSCILLATOR disabled

Part Number: TM4C1290NCZAD
Other Parts Discussed in Thread: EK-TM4C1294XL

Dear Sir/Madam,

Please provide the solution for the below issue:

We are using TM4C1290NCZAD for our project.

We have added external crystal 32.768 kHz for using hibernation module in the board.

We have configured the board with the below clock configuration:

SysCtlClockFreqSet( ( SYSCTL_OSC_EXT32 | SYSCTL_USE_OSC | SYSCTL_MAIN_OSC_DIS | SYSCTL_CFG_VCO_480), 40000000);

After that, we are unable to re-program the device. We have tried all possibilities by using reset pin, power off/on. But the board is not detected by the JTAG.

  • We have configured the board with the below clock configuration:

    SysCtlClockFreqSet( ( SYSCTL_OSC_EXT32 | SYSCTL_USE_OSC | SYSCTL_MAIN_OSC_DIS | SYSCTL_CFG_VCO_480), 40000000);

    What system clock frequency do you want to run the device at?

    While the ui32SysClock parameter in the SysCtlClockFreqSet() call is 40000000 (40 MHz), when using the hibernation 32.768 kHz the ui32SysClock parameter is ignored and the system clock frequency will be 32.768 kHz. The following table in the datasheet shows that the RTCOSC doesn't have the capability to drive the PLL:

    There is also the following note in Table 26-12. JTAG Characteristics of the datasheet:

    Which means for JTAG to be used the system clock frequency must be at least 8 times the JTAG TCK frequency.

    So, with the system clock frequency at 32.768 KHz the maximum JTAG TCK frequency which can be used is 4.096 KHz.

    But the board is not detected by the JTAG.

    Which JTAG probe are you using?

    Some allow the JTAG TCK frequency to be slowed down. If can select say 4KHz as the JTAG frequency you should be able to detect the board with JTAG again.

    Another option is to run the unlock sequence, which is a method to reset the TM4C12x microcontrollers to the factory state and erase the program in flash. See the Executing Unlock Sequence section in the TM4C JTAG Guide: http://www.ti.com/lit/spma075

  • Dear Chestor Gillon,

    Thanks for the inputs.

    I have tried the JTAG TCK frequency setting and unlock sequence but it is not working always in a consistent manner. It works after many failure attempts. Also, I would like to know the reason for why the board is getting locked.

    I am having struggling time with the usage of "SysCtlClockFreqSet" with one of the config as "SYSCTL_USE_OSC" making the board to gets locked as per my debugging.

    My intention is to configure the system clock at 16MHz and later on wanted to enter into hibernation mode using RTCOSC and upon wakeup would like to run my code at the system clock 16MHz. If you could share me code snippet for this clock configuration, it will resolve my issue.

    Looking forward to get your response at the earliest.

    Thanks and Regards

    Ram

  • Hi,

    My intention is to configure the system clock at 16MHz and later on wanted to enter into hibernation mode using RTCOSC and upon wakeup would like to run my code at the system clock 16MHz.

      There is an internal 16MHz PIOSC ( precision internal oscillator). To use the internal osc you can call:

    ui32SysClock = SysCtlClockFreqSet(SYSCTL_OSC_INT | SYSCTL_USE_OSC , 16000000);

    Suppose you have a external 16Mhz crystal that you want to use as SYSCLK then call:

    ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_16MHZ|
    SYSCTL_OSC_MAIN |
    SYSCTL_USE_OSC), 16000000);

    Please also refer to the hibernate examples at:

    C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hibernate

    C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hibernate_calendar

  • We were trying some hardware changes for other functionalities due to that I was unable to test it.

    I have another question regarding hibernation. May be next time, I will update with you quickly on my testing.

    Question is: My application enters hibernation mode upon power failure and wake up upon EXTERNAL Wake pin.

    It is waking up without any issues for the first time. From second time onwards, I am getting glitches for every 6 Seconds for WAKE and HIB pin.

    Due to that, my application never re-enters hibernation mode.

    If I do power reset, my application enter hibernation for the first time and second time onwards, the glitches are coming.

  • Hi,

    From second time onwards, I am getting glitches for every 6 Seconds for WAKE and HIB pin.

    - Not sure why there is a glitch. Can you show a scope cap of the WAKE and HIB pins? Please also show VBAT and VDD when glitch happens. 

    - Please compare your hibernate schematic with the example hibernate circuit shown in the datasheet. Do you have the proper Rbat and Cbat?

  • I have made the analysis and specified the snippet of HW schematics and tested with the application code in the document file "Hibernation Details" in the below link.

    The scope observations shows the glitches that is given in the file "Hibernation Details" in the below link. 

    Please suggest possible solutions from your end.

    https://docs.google.com/document/d/1gLuKtkwZ1Se7zAN7wxbN3xzzy566x0nI/edit?usp=sharing&ouid=113479432014330985313&rtpof=true&sd=true

  • Hi,

      My company blocks us from external file sharing sites. You can just drag your file to the forum window. 

      Please also do the below experiments.

     - Run your own application code on the LaunchPad. Do you see glitch on WAKE/HIB pins on LaunchPad? 

      - Run the TivaWare Hibernate example on your custom board. Do you see the glitches?

      The two experiments will help us narrow down if the problem is with your board or your code. 

  • Hi,

      - From the limited schematic you show, I don't spot a problem. 

      -Your schematic did not show the oscillator frequency. You firmware specifies 16Mhz . I just wanted to make sure you crystal is 16Mhz, not something else like 25Mhz. 

      - You wrote HibernateEnableExpClk(32768) and I think this has no bearing the result of the operation. See  below. Please also refer to the TivaWare Hibernate.c example. 

      - You have not answered my prior questions. Let me repeat here again.

      - Run your own application code on the LaunchPad. Do you see glitch on WAKE/HIB pins on LaunchPad? 

      - Run the TivaWare Hibernate example on your custom board. Do you see the glitches?