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.
Tool/software: Code Composer Studio
I use example "hello.c".
This is my code.
////////////////////////////////////////////////////////////////////////////////////////////
int
main(void)
{
ROM_FPULazyStackingEnable();
ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ |
SYSCTL_OSC_MAIN);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_0);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_2);
ConfigureUART();
UARTprintf("Hello, world!\n");
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_0, GPIO_PIN_0);
while(1)
{
//
// Turn on the BLUE LED.
//
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, GPIO_PIN_2);
//
// Delay for a bit.
//
SysCtlDelay(SysCtlClockGet() / 10 / 3);
//
// Turn off the BLUE LED.
//
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, 0);
//
// Delay for a bit.
//
SysCtlDelay(SysCtlClockGet() / 10 / 3);
}
}
////////////////////////////////////////////////////////////////////////////////////////////
I set PF0 to high or low, I always measure 2 voltage in this pin.
Where do I need to set it?
Might that occur as you (likely) "missed" the known fact that PF_0 defaults into "NMI" status - which precludes your use for (other) purposes!
You must employ the special, "Pin Unlocking Procedure" - which is detailed w/in MANY posts here - and accessed via "Search Box" (atop the forum.)
Or - faster & more simply - you may AVOID troublesome "PF_0" and (partner in identical crime, PD_7) by using a "normal" GPIO, instead. Thus no "delightful" extra effort is demanded!
Many of your fellows have fallen victim to such an unwise & unwanted "NMI default." No/Zero effort has been made to correct this short-coming - which always results in posts "such as yours."
Bob - we (all) must note that the "effective" highlights you've deployed, "DO NOT APPEAR ANYWHERE" w/in the 1,000 page plus MCU manual. Nor elsewhere - to the best of my knowledge!
Thus - the (clearly) TOO WEAK (and buried) existing warnings have LONG proven INEFFECTIVE - as they are, especially easy to MISS!
Myself/others have LONG reported this - and (as stated) NO/ZERO corrective efforts have been launched!
Proof positive of this LONG KNOWN FACT - poster's arrival here - followed (surely) by many of his fellows! Not good! (none of this "your" doing - but concern for the correction of a KNOWN WEAKNESS seems less than apparent, here!)
Again Bob - never (rarely) is my commentary directed toward "individuals" (you especially - stand blameless.) (yet courtesy your wife - not horseless.)
Top "sticky post" - of course - is NOT where the "Road OUT Sign" is best placed - is that not true? Few here (to include this reporter) would vector to "Diagnosing Problems" (if they even note that) when starting a fresh project. Thus - too many here - are condemned to, "Fall from the high cliff - which is painfully UNMARKED!
As long & repeatedly suggested - this "NMI as default" (even that questionable) requires "multiple, bold placements - sure to be noted - across multiple documents - even across that "sacred (RED) ground" (atop the forum) unwisely reserved for, "Blogs, Groups, Videos."
None of this "rocket science" - has long been known - and "allowed" to fester - eating time/effort of too many! That's sad commentary - is it not?
Bob - no one here expects, "Vendor Perfection." (admission of "chip" in that perfection "armor" may explain vendor's inaction) Surely (some) "Care for Users" should cause (some) attempt to, "Highlight thus Safeguard Client-Users from a LONG KNOWN, inadequately presented/conveyed warning - which has impacted SO MANY! (well over 100 forum reports - here todate!)
Bruno - mon ami,
Bruno Saraiva said:Trying to be proactive
Has not that, "Ship to Proactive" long sailed/departed? FIVE + Years ago - as we recall. This short-coming has - for SO LONG - been known! While your effort in identifying (potential) points for "added warnings" is appreciated - it can in NO WAY be claimed as "Proactive." And - that's clearly the vendor's job - our job is to bring this matter to the vendor's attention - and we've done such!
Bruno Saraiva said:user has a problem with GPIO - does not read far - can he really expect to grow?
Bruno, Is not your key (quoted) word, "expect?" Do not 90%+ of the MCU's GPIOs perform - exactly - as the unwarned user would expect? Indeed they do - so the user is (easily) entrapped!
Indeed the poster "should have searched" - yet, "Search for what?" Would it dawn to search upon PF_0? Preventing such unexpected (and unnerving) such issue - rather than "demanding" such search - is (very ) much preferred!
Bruno Saraiva said:I can assume that for these 100
100 was FAR too conservative a number - Searching upon "PF_0" (alone) returns beyond 500 past posts! (scroll goes "on & on" - seemingly forever.) Note that those who DID "search successfully" - would not (properly) add to the total, "PF_0 hits."
Bruno Saraiva said:other 9900 users actually quickly found the answer.
Your "9900" Pure Rubbish! And - you of course - can offer NO/ZERO support for (any) claim of "quickly" finding the answer! Unsupported "claims" ring "hollow" - reveal "desperation" - and totally fail...
You appear to side w/"Users be damned!" Discover, "on your own" - employing (microscopic - minimally effective) warnings/cautions! Not (exactly) marketing textbook...
You (surely) noted that - to (properly convey) the "well hidden NMI caution" (which you seem to defend) - our Vendor "found the need" to ADD HIGHLIGHT - so that - hapless users would enjoy (some chance) of finally noting - the (for SO LONG) well-hidden caution!
And - left for your consideration - if, "So well known an issue is allowed to persist" (for so long) - how does this speak to multiple other issues - not so "well known?" That's important - and likely "REPEATS" (ineffective alerts/warnings) - does it not?
Thanks you all,I tried all yours suggestion and the problem solved now.
Many thanks,
WeiYu