Other Parts Discussed in Thread: TM4C123GH6PM, EK-TM4C123GXL
Can someone write simple code, using tivaware api to make simple pwm output and then comment everything why are there some functions used? I need really slow freq like few hertz.
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.
Other Parts Discussed in Thread: TM4C123GH6PM, EK-TM4C123GXL
Can someone write simple code, using tivaware api to make simple pwm output and then comment everything why are there some functions used? I need really slow freq like few hertz.
user4096729 said:I need really slow freq like few hertz.
That extremely low PWM frequency (may) draw folks in - yet it's unexplained!
Best results often occur when you "sell" your post. (make it of interest - even possible benefit - to others)
How well have you sold your post?
Chuck,
Still missing here is poster's (need - and the "specifics") of very low-frequency PWM. As I stated - that's a slippery path - and surely "untouched" by hallowed Lab 15. (or any such lab)
I stand by the obvious advantage of, "Drawing responders to poster's aid" by post creations which serve to benefit and/or intrigue many! That's (surely) not judgmental - that's reality - Selling works! (how I took past tech firm public...)
Ok i now have working pwm, also I want to get UART working in different file. It is in my project uartas.c, header file also there. AS soon as i cool my function ConfigureUART();
it shows following error:
Description Resource Path Location Type
unresolved symbol UARTStdioConfig, first referenced in <whole-program> pwm C/C++ Problem
I got my all libraries included in main.c file and uart.c dont know whats wrong :/
user4096729 said:I need really slow freq like few hertz.
Robert,
Such appeared poster's opening salvo. PWM at such low frequency descends awfully close to "On/Off" keying - if the 16 bit PWM counter can even be forced to that low a frequency.
Opening post sought, "Simple code w/PWM output on a pin." KISS "kicked to the curb" now the PWM becomes held hostage to UART (and others - (always) unspecified - added to the witches' brew...)
I'm not sure what to make of this Chuck
Chuck Davenport said:Make sure the new file is not only included in the main.c
I'm hoping this is just badly worded. If what it says is what you meant then it is wrong. There are very few cases where it makes any sense to include a source file within another source file. I can come up with only a few but this is not one of them.
Source files should be compiled separately and linked together. You need a very very good reason to give up the benefits of separate compilation before doing otherwise.
Robert
BTW the cases I can come up with are
I did read it Chuck and although you did mention header files it left the strong impression you were recommending against separate compilation. I had hoped and am now reassured that is not what you meant but I did think it needed to be pointed out.
I had just spent some time in the last few days correcting some vendor code that did, in fact, commit that sin so I was sensitive to it. Hopefully not too strong a reaction.
Robert
BTW, not TI code. But practices like that by various IC vendors have been a good deal of what has made me very skeptical of the quality of vendor supplied code
Chuck Davenport said:Sometimes these HW guys throw sound SW engineering principles out the window and exclaim everything is fine since "it works!"
And - to be fair - is it not rue that the corollary, "Sometimes these SW guys throw sound HW engineering principles out the window..." deserves admission?
Very low frequency PWM (poster's goal - expressed w/in very 1st post) remains untouched/unprobed - should anyone care...
PWM question was solved. I marked it as answered.
So far I haven't tried solution with my uart problem because i was extremely busy. I will try tomorrow and I will give response if the problem will be solved.
user4096729 said:PWM question was solved.
Does this mean you achieved your goal of "Few Hz" PWM operation - while avoiding, "On/Off Keying?"
Suspect that is the "real meat" of your posting - and remains silent...
And - if you continue in the pursuit of "Few Hz PWM" AND seek to introduce a monitoring UART - that twain (may not) meet...
UART problem solved. It looks like code composer studio cant find utils folder, so I created folder utils in the project with shortcuts to uartstdio.c files and it worked. I dont know why it didnt work before because it was included with arm linker. I guess it is not included in libc.a file, but I dont know that for sure.
If I have more questions wich is not associated with this post topic should I ask there, create another topic or contact you directly Robert? i am asking because of complains in this post :/
Create a new post.
Questions we don't like
If you are unsure what information to provide, post a brief description of the problem and ask what information is needed/useful.
Just remember most of us are here because we like to help. It's a way to pay back those who helped us when we did not understand. And we often have the faint hope that we will increase the general quality of firmware (which is why you will see some of us push for quality practices, and even chide TI, hopefully respectfully, when we see them not following them).
Forums sometimes feel harsher than they are. Text often carries emotions to the reader that the writer did not intend.
Robert