Describe the bug
I am working on BeagleBone Black with Debian Os. when I use PWM then I got kernel error. I receive errors while I use PWM(P9_14). sometimes runs and sometimes not. can suggest to me when this thing is to occur. I was set to pin P9_14 to PWM using config-pin P9_14 pwm.
Message from syslogd@beaglebone at Sep 3 07:51:49 ...
kernel:[ 2412.180927] Internal error: : 1028 [#1] PREEMPT SMP ARM
To Reproduce
1) CODE :
#include<stdio.h>
#include <stdlib.h>
#include<rc/pwm.h>
#include<rc/time.h>
#define SS 1
#define CHANNEL 'A'
int pwm=0;
int duty=0;
void main()
{
int init = rc_pwm_init(SS,100);
printf("\ninit=%d\n",init);
while(1)
{
duty = rc_pwm_set_duty_ns(SS,CHANNEL,pwm);
printf("\nduty=%d pwm=%d \n",duty,pwm);
rc_usleep(5000000);
pwm+=1000;
if(pwm>3000000){pwm=3000000;}
}
int close = rc_pwm_cleanup (SS);
printf("\nclose=%d\n",close);
}
Aim: stop Kernel error: PREEMPT SMP ARM
Describe the bug I am working on BeagleBone Black with Debian Os. when I use PWM then I got kernel error. I receive errors while I use PWM(P9_14). sometimes runs and sometimes not. can suggest to me when this thing is to occur. I was set to pin P9_14 to PWM using
config-pin P9_14 pwm
.To Reproduce 1) CODE :
2) COMPILE : gcc pwm.c -l:librobotcontrol.so.1 -o PWM 3) RUN : ./PWm 4) ERROR:
Platform information debian@beaglebone:~$ cat /etc/issue Debian GNU/Linux 10 \n \l
BeagleBoard.org Debian Buster IoT Image 2020-04-06
Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
default username:password is [debian:temppwd]
debian@beaglebone:~$ cat /proc/version
Linux version 4.19.94-ti-r42 (voodoo@x3-am57xx-beagle-x15-2gb) (gcc version 8.3.0 (Debian 8.3.0-6)) #1buster SMP PREEMPT Tue Mar 31 19:38:29 UTC 2020