We’ve been using the Beaglebone Black running Wheezy 7.9 to replace an old legacy piece of hardware, but need it to be backwards compatible.
We have it working and everything is fine, BUT…
We’d really like to move it over to Jessie so we can use the cheaper Green unit (having trouble with the SPI with Green/Wheezy).
But here’s the problem: Moving over to Jessie (even on the BB-Black) throws off our signal timing. For example when we get
a certain byte of serial data we’re supposed to respond with our own in ~16ms. Code runs fine in Wheezy, in Jessie it responds in over 30ms.
Deal breaker, won’t work with the system. I seeing that Wheezy was calling ‘rt-code’ so made sure to update Jessie with the 4.1x-TI-RT kernel.
No help. Has anyone had experience with this?
I’m setting up a repetitive timer and a signal action that is called when the timer expires.
ala (brief code follows so you can see the exact stuff)
//Timer variables
#include <sys/time.h>
struct sigaction sa;
struct itimerval timer;
void InitializeTimers()
{
//Install timer_handler as the signal handler for SIGVTALRM
memset(&sa, 0, sizeof (sa));
sa.sa_handler = &timer_handler;
sigaction(SIGALRM, &sa, NULL);
timer.it_value.tv_sec = 0;
timer.it_value.tv_usec = TLI_MaxInterval+(TLI_MaxInterval/4)*(MyTLI_Addr-1);
timer.it_interval.tv_sec = 0;
timer.it_interval.tv_usec = TLI_MaxInterval;
setitimer(ITIMER_REAL, &timer, NULL);
}
I reset this timer every time I get a byte on the serial port.
This is some of the system info Wheezy vs. Regular Jessie
Jessie Settings (Default)
root@beaglebone:~# cat /boot/config-uname -r
| grep HZ
CONFIG_NO_HZ_COMMON=y
CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ is not set
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_HZ_FIXED=0
CONFIG_HZ_100=y
CONFIG_HZ_200 is not set
CONFIG_HZ_250 is not set
CONFIG_HZ_300 is not set
CONFIG_HZ_500 is not set
CONFIG_HZ_1000 is not set
CONFIG_HZ=100
root@beaglebone:~# cat /boot/config-uname -r
| grep HIGH_RES_TIMERS
CONFIG_HIGH_RES_TIMERS=y
root@beaglebone:~# uname -a
Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux
Wheezy
root@beaglebone:~# cat /boot/config-uname -r
| grep HZ
CONFIG_NO_HZ=y
CONFIG_RCU_FAST_NO_HZ is not set
CONFIG_OMAP_32K_TIMER_HZ=512
CONFIG_HZ=512
cat /boot/config-uname -r
| grep HIGH_RES_TIMERS
CONFIG_HIGH_RES_TIMERS=y
root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux
root@beaglebone:~# cat /boot/config-uname -r
| grep HIGH_RES_TIMERS
CONFIG_HIGH_RES_TIMERS=y