Most probably one of your fprintf() fails. The reason for it could be
wrong arguments you are passing to it. Most probably the FILE* pointer
is null. Why it could be? Because file is not opened properly. How it
could happens? For example because the path you are passing to fopen()
is wrong. How that could happen? Either file does not exists or you do
not have enough permissions or your constructed path string is wrong.
How it could be wrong? Look for example how you are using
*uninitialized* temp1 variable with strcat(). Here you are calling for
problems.
So what I would suggest to do are:
- clean up your code so that you are not manipulating uninitialized strings
- it is absolutely necessary to add error checking and handling for
fopen() function. It will tell you what is wrong.
- there is absolutely no need to open/close the file every time you
want to write to it. It is *very* inefficient. Consider adding FILE*
parameter to your gpio_control function, open the file at the
beginning of your program and close it at the end.
Speaking about software PWM generation - you might be interested to
take a look at the following article:
http://veter-project.blogspot.com/2011/09/real-time-enough-about-pwms-and-shaky.html
In addition, the following article provides great overview about what
is possible on BeagleBoard:
https://www.osadl.org/fileadmin/dam/rtlws/12/Brown.pdf
--
Andrey.
--
To join: http://beagleboard.org/discuss
To unsubscribe from this group, send email to:
beagleboard...@googlegroups.com
Frequently asked questions: http://beagleboard.org/faq