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.

Problem With SysCtrlClockSet() routine of TM4c1230H6PM device

Hi Team,

I am having trouble with the routine of SysCtrlClockSet() routine. In my design in the main() as a first instruction i used

    SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ |
                       SYSCTL_OSC_MAIN);  instruction is given for my application.

When i run code through the CCS debug session it is working fine. But after Power on of the board the code was strucking in the sysctrlclockset() routine only.

When I run thorugh the debug session after power on RCC register MAIN oscillator is read as '0'( enabled) which is not causing any issue to me. Where as after power on of the board, it is getting as '1' and routine is staying at the Sysctrldelay(528288) only permanently.

Help me out from this problem

Regards

Vasavi V

  • Hello Vasavi,

    Can you check if the Crystal is starting correctly when running after the Power On of the board? Also please check the crystal schematics to see the capacitor on crystal legs are as per the data sheet specifications.

    Regards
    Amit
  • Hi Amit,


    I have checked it, its running properly, i am getting 16Mhz oscillation signals on both osc0 and osc1 pins. And i have placed capacitors as given in tiva launchpad.

    Is there any condition of controller to enter into sleep mode(other than normal running mode) at power on only?

    Or any other causes, that controller stops running.

    Regards

    Vasavi V

  • Hi Amit,

    I have observed one different behaviour of the card is after power off on device has strucked and external oscillator is running fine(16 Mhz), once if i connect and disconnect the device thorugh the option of "connect target" in the CCS debug window, it is working fine with normal behaviour.

    Here i am suspecting that, device shall entering into the some unknown state after power on. After establishing connection with debug Access point through JTAG, the controller shall leaving its present state and started working in normal mode.

    How can i confirm whether my device is in normal mode or in different mode.

    this condition may help us in trouble shooting of the problem.

    Regards
    Vasavi V
  • Hello Vasavi,

    No, the device does not enter low power unless application code explicitly programs it to do so. The only other cause I can think of which may create such an issue would be main crystal failing or application code generating continuous resets via WDT or Software Reset.

    Regards
    Amit
  • Hello Vasavi,

    It seems that there is a source of continuous reset. Can you check and confirm what i have mentioned in the earlier post. Also do check on Supply voltage stability?

    Regards
    Amit
  • Hello Amit,

    The main oscillator is not falling from power on, and power supply is also good. and i am not clear about how to check the WDT resets and Software resets generated by the controller. Are there any specific registers to monitor or external hardware pins to check.

    If i put some blinky code provided in examples it is running as expected.

    At present my code size some what bigger is this requires any memory allocations to change in map file or settings to be done in CCS compiler?

    If that is the case why it is running after establishing link through the CCS debug access point?

    Regards

    Vasavi V

  • Hello Vasavi,

    There is a Reset Cause Register in the System Control Address Space (SYSCTL.RESC). Is the code that you have in the device use WDT or Software Reset (basically any source of reset other than Pad Reset)

    Regards
    Amit
  • Hi Amit,

    My controller is working fine,because of wrong handling of wide timer the controller has entered into some unknown state. Know the problem is rectified and it is good.

    I have one more doubt when i use wide timers as two split 32 bit timers, to read interrupt status resister in tiva peripheral library the following routine will help in reading interrupt status register values of WTIMER-A, but to read WTimer-B status register values what address i have to pass this routine and what could be the bool status value?

    TimerIntStatus(u_int32 baseaddress, bool status)


    Regards,

    Vasavi V
  • Hello Vasavi,

    The Interrupt status API call for wide timer is the same as that for the 32-bit timer. You need to use the Wtimer Base Address as is.

    Regards
    Amot