energia/Energia — pull request #499 by spirilis (2014-10-21 15:41:52+00:00)
Title: CC3200 C++ constructors run before GPIO, timer init

This is an issue that was fixed on the Tiva/Stellaris platform a while back but seems to exist on cc3200. Normally it's discouraged to put any hardware init routines inside the C++ constructor of a library, but unfortunately it does happen, and the Arduino AVR platform often suffers no ill effects from it. However on the ARM platforms, commands such as pinMode() and digitalWrite() inside a C++ constructor will cause the CPU to crash in FaultISR() due to an attempt to hit a GPIO peripheral which has not had its peripheral clock activated yet.

This pull-request breaks out the peripheral init & timer init into a separate "_init()" function and modifies ResetISR() to execute that before C++ ctors.