I am working on LM3S5K31 controoler and embos 3.82K. I am trying to use Hibernation module, but when I write "HibernateIntRegister(MyHibernateHandler);" to register Handler function for processing interrupt, processor got stuck in _IllegalException.
Please guide me how to use Hibernate module.
Thanks a lot..
Your issue is most likely that you did not correctly configure the interrupt vector in the Startup file. Which IDE are you using? In your project, open the startup_ccs.c (or _ewarm, _rvmdk, _gcc), and then insert the extern directive and vector define. Each IDE has its own specific format, so you should look at other Stellarisware projects that use properly configured interrupts. For example, if using Keil, in startup_rvmdk.c add EXTERN HibernateIntHandler and DCD IntDefaultHandler ; Hibernate in the __Vectors section. Below are some specific examples to look at and where to find them.
If you have not already done so, download Stellarisware for the LM3Sxxxx devices at http://www.ti.com/tool/sw-lm3s. It has working examples for all of the evaluation and developement kits.
See interrupts or timers example at path C:\StellarisWare\boards\ek-lm3s9b92\interrupts and C:\StellarisWare\boards\ek-lm3s9b92\timers, respectively.
For a working Hibernate example, see C:\StellarisWare\boards\ek-lm3s1968\hibernate. This example does not use interrupts, but will give you a good starting point of for configuring, and using the hibernate module. Since hibernate is similar to a POR, the code is configured to first determine if it is waking up from Hibernate or if it is a POR (power on reset.)
Review document for a full description of the Stellarisware API's follow path C:\StellarisWare\docs\SW_DRL_UG_xxxx.pdf. Inside the Stellaris Peripheral Driver Library User's Guide, you will find a full descripton of each of the functions. For example:
Registers an interrupt handler for the Hibernation module interrupt.
Parameters: pfnHandler points to the function to be called when a hibernation interrupt occurs.
Description: This function registers the interrupt handler in the system interrupt controller. The interrupt is enabled at the global level, but individual interrupt sources must still be enabled with a call to HibernateIntEnable()
IntRegister() for important information about registering interrupt handlers.
To provide another example of hibernate with masked interrupts, I have attached a RTC.c and Startup_rvmdk.c file. We don't have it available in Stellarisware. It does demonstrate using masked interrupts for the hibernate module.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.