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.

TIRTOS MOSC Failure

Other Parts Discussed in Thread: SYSBIOS, TM4C129ENCPDT

Hello

I am using the TM4CENCPDT in a new development and have a requirement to be able to detect and indicate crystal failure.  I have read through the manual and know there is a MOSC failure NMI interrupt or reset that I can trigger.

I understand the PIOSC takes over in case of the MOSC failure. So am hoping I can either still indicate on the LCD or at very least go into a loop which activates a buzzer if the MOSC fails.

What I would like to know is how I can do this in conjunction with TIRTOS as my project is running with this.

I am using tirtos_tivac_2_00_01_23

  • Hello Barry,

    Yes, that is correct. However from a system operation perspective please bear the following

    When the MOSC fails and the PIOSC takes over, the System clock will change. So if the code is using PLL+MOSC, then on a MOSC Failure it would switch to PIOSC. This may not work well with an LCD Panel, if it is a raster panel or a LIDD panel during a data transfer.

    You can use a buzzer though and use the NMI interrupt handler to start the same. Please do note that the buzzer if pre-configured or post-configured for NMI must be programmed with PIOSC frequency of 16MHz as some of the API accept the System Clock Frequency as a parameter.

    As part of the TI-RTOS, you would have to enable the NMI Interrupt Handler with the required configuration of the System Control Module for NMI generation as part of the Initialization Task.

    Regards

    Amit

  • Thanks for your detailed answer.

    Just a couple more questions.

    Can both PIOSC and MOSC be set up to use PLL or is there just one PLL which can be with either clock source?

    In other words is it possible for me to have the PIOSC initialised to match what the MOSC will be?

    Do I enable the NMI handler as part of the Boot or Startup sections of SysBios or just in my main?

  • Hello Barry

    There is only one PLL in TM4C129 devices. The clock source to the PLL can either be MOSC or PIOSC. The PIOSC is a fixed 16MHz clock source (+/-3% variation). It cannot be varied to match the MOSC which is an external crystal.

    The NMI Handler should be initalized in the Startup section of SysBios as the MOSC failure can happen even during this phase. It should be done before PLL Locking is Done.

    Regards

    Amit

  • Thanks Amit

    I have been through the CFG file for my project and cannot find anywhere under sysbios or its startup section that I can specify the NMI interrupt vector function.

    How is this done?

    I can see how I can set functions before and after module initialisation as well as before C runtime initialisation but nothing allows me to specify the function to be called in case of an NMI?

    I went through the TIRTOS manual and no mention of NMI in there

    I went to the HWI section of the graphical config but am not sure if this is the correct place?

    The device specific setting don't have NMI and also display M3-Specific Hardare Interrupt when the TM4C129ENCPDT is in fact M4, so a bit confusing.

  • Hello Barry,

    I checked as well and watchdog is also mapped as reset and not NMI (which is one of the functions). The other thing that I did notice was that hwi did not allow Interrupt Vector Number less than 16 (NMI is in 0-15).

    We would need to check with the TI-RTOS forum.

    Regards

    Amit

  • Thanks for reply Amit

    I found the HWI restriction as well and also found

    However if I put a different function name here it simply generates a linker error saying the function is missing.

    Even though I put the function into my code so I know it exists?

    I have searched the forum and cannot anything so far, are there any additional manuals on this?

  • Hello Barry

    The M3 (Ducati) is something else. It is not LM3S nor TM4C. I would move the thread to the TI-RTOS forum for help. Is that OK?

    Regards

    Amit

  • That's fine.

    I have looked in that forum and there are some suggestions but for other CPUs and they don't work for the TM4C

    Thanks