This is the tricky parts of programming multi threaded software. When the cpu utilization is high (higher than about 63%), some of the lower priority tasks may not get to run in time.
Generally the lower period tasks and higher priority tasks get scheduled more often.
Alex
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget+unsubscribe@googlegroups.com.
At the moment I closely watch code related to sample rate detection in the SPDIF receiver code. It basically waits for an LRCK transition, counts during two half-periods, and returns. There's a timeout built in, and it doesn't hang. My first take on it was to disable global interrupts and run it once. (https://github.com/borgestrand/sdr-widget/blob/audio-widget-experimental/src/wm8805.c#L605)Hi Alex,while I did have a bit of a problem-exists-between-keyboard-and-chair type of moment, there remain things which I can't quite understand.My next take on it is to keep global interrupts on, and rather run the darn thing repeatedly until I have N identical measurements. This is probably very good for the scheduler and a little bad for the response time of my code.Børge
On Mon, Mar 6, 2017 at 1:28 PM, Alex Lee <alexl...@gmail.com> wrote:
This is the tricky parts of programming multi threaded software. When the cpu utilization is high (higher than about 63%), some of the lower priority tasks may not get to run in time.
Generally the lower period tasks and higher priority tasks get scheduled more often.
Alex
On Mon, 6 Mar, 2017 8:08 pm Børge Strand-Bergesen, <borge....@gmail.com> wrote:
BørgeMy suspicion is that this is due to UAC1 and UAC2 running at different RTOS priorities. Before I start hacking away here I'd like to check if you have any experience around this block of code:While debugging the SPDIF RX code the last few days I've seen that things which work in a UAC1 context start to fail in a UAC2 context. I'm missing out on expected LED blinks and debug characters. Change one line of code in one place, and the LEDs start working again in a completely unexpected way.Hi guys,
/* USB device task definitions. */
#define configTSK_USB_DEV_NAME ((const signed portCHAR *)"USB Device")
#define configTSK_USB_DEV_STACK_SIZE 256
#define configTSK_USB_DEV_PRIORITY (tskIDLE_PRIORITY + 3)
#define UAC1_configTSK_USB_DEV_PERIOD 10
#define UAC2_configTSK_USB_DEV_PERIOD 2
#define HPSDR_configTSK_USB_DEV_PERIOD 2
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I remember playing with the task priority and period to be able for all the tasks to work well, as the cpu utilization is close to the limit for uac2.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget+unsubscribe@googlegroups.com.