Kendall WitteIn my opinion, it is regrettable that blinky.c doesn't use the Stellarisware routines to configure and update the GPIO that drives its LED. http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/t/171912.aspx
http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/t/171912.aspx
Indeed. And many others have said the same thing - many times!
Is it not, then, about time that a "Blinky" example was produced which does use the Stellarisware routines to configure and update the GPIO that drives its LED?!
Andy,
The concept of a "blinky" example is to be a simple, easy program. If "blinky" uses StellarisWare routines, then the DriverLib would need to be included which bloats the example and makes the example more complicated (although not by much).
I would challenge anyone who says it takes them longer than 10 minutes to implement "blinky" using StellarisWare - which also makes for a fun exercise :).
Regards,
Alex
I think you're entirely missing the point there!
Stellaris AlexThe concept of a "blinky" example is to be a simple, easy program
And the purpose of a StellarisWare "blinky" example is to be a simple, easy StellarisWare program!
Stellaris AlexIf "blinky" uses StellarisWare routines, then the DriverLib would need to be included
Indeed - so the purpose of a StellarisWare "blinky" example is to illustrate exactly that without over-complicating the issue with a compex application!
Stellaris AlexI would challenge anyone who says it takes them longer than 10 minutes to implement "blinky" using StellarisWare
I think this very forum bears ample testimony to the fact that there are very many users failing that challenge by a very long way!!
Andy NeilAnd the purpose of a StellarisWare "blinky" example is to be a simple, easy StellarisWare program!
This is not necessarily true - and clearly people's opinions differ ;).
You know as well as I do if "blinky" was written using DriverLib, someone else would be here asking me for a simple application that uses direct register writes or arguing "blinky" should be written without a library.
Maybe we should release two versions of "blinky" ... ?
There should maybe be two versions of several of the examples, so that people can see how to do them with StellarisWare, and people can see how to do them with direct register writes.
Blinky teaches some bad lessons that cause problems when people try to learn from it. Its smallness is part of its problem. When enabling the GPIO port, a direct write is done the the register, not an OR. It's not made clear that this write will enable one device and disable others. An example that enabled more ports, or that had better comments about exactly what was going on would be helpful.
It seems that in general people that don't want to use StellarisWare also don't think to look at the source for StellarisWare for examples and documentation of how to access the hardware registers, so those people need other examples of the correct way to do direct register writes to perform the things they need to do.
Stellaris Alex Maybe we should release two versions of "blinky" ... ?
Yes - that was exactly my suggestion!
Sorry if that was not clear.
slandrum There should maybe be two versions of several of the examples, so that people can see how to do them with StellarisWare, and people can see how to do them with direct register writes.
Yes - that would be good.
slandrumBlinky teaches some bad lessons that cause problems when people try to learn from it. Its smallness is part of its problem
TI/Stellaris is not alone in that!
slandrumpeople that don't want to use StellarisWare also don't think to look at the source for StellarisWare
This is true - but bizarre!
One would have that those wishing to use direct register access (rather than APIs) would be the hardened, advanced users - but to such users, surely, looking at the StellarisWare source would be such an obvious approach?!
Andy Neil slandrum There should maybe be two versions of several of the examples, so that people can see how to do them with StellarisWare, and people can see how to do them with direct register writes.Yes - that would be good.
Beware of what you request! Good for whom - and for how long? And have you properly considered the "unintended consequences" of such additional Direct Register (DR) examples?
LMI/TI have a large and on-going investment in StellarisWare - diluting this has risk - must come from high up. (if at all) Believe StellarisWare is by far - "best in class" - isolates both new and entrenched users from critical mistakes while saving both (novice/experienced) from the rather severe demands of multiple register identification, analysis and verification. Effective use of DR methods forces far greater effort upon the user - and upon every single "back/forth" forum posting due to intricacy, possible register linkages & much greater detail.
If "several examples" are offered - which ones? How do you ever cap this - or even can you? How do you illustrate the necessity to systematically read/review 20, 30, 40 or more registers - with the goal of discovering "just which ones" truly influence the user's particular need/application? The admittedly "too short, imprecise" blinky examples surely "bumped against" this dilemma - suspect their shortness won out over the demands/expectations/time required for proper, detailed explanation... What now has really changed - to justify such re-think, re-direction of TI tech staff?
Surely "DR Use/Enhancement" has its place - but I doubt that it is via "another few examples" and then "woven" into this forum. All 500+ pages of the current SW-DRL-UG's drawings, descriptions, charts, and examples are insufficient to preclude 10-20 requester posts on a near-daily basis. A seeming encouragement of "DR Use" may open a torrent of vastly more demanding, "DR support," requests - even when DR's selection over StellarisWare is questionable. (i.e. use restricted to code execution speed-up or size reduction goals - my read of such forum posts shows very minimal "justification" for DR use - thus both User & forum helpers - beware!)
In general - StellarisWare must be the "first/best choice" - the business case for StellarisWare dwarfs all others. Enabling DR & other, competing methods forces perhaps an unfair/unplanned - new workload upon TI tech staff - especially if properly explained/detailed... (and then - how long until raw Assembler examples & detailed explanations "bubble-up?")
+1 for a StellarisWare version of the blinky example.
I've learned the hard way that I can't mix-n-match code from the blinky example with other StellarisWare examples. Now I've got to find a good example for how to use the GPIO library just to enable/use some LEDs on my dev board.