Puts, stdout trouble with VSIDE Audio Effects template.

Installing and using VSIDE tools for VLSI Solution's devices that contain a VSDSP signal processor.
Post Reply
User avatar
VLSI Staff
Posts: 2766
Joined: Tue 2010-06-22 13:43

Puts, stdout trouble with VSIDE Audio Effects template.

Post by Panu » Thu 2012-01-19 10:58

Hi, all!

Just to let you know, there's a side effect in the interrupt handling in some VS1053, VS1063 IDE templates that have audio input and output, which prevents proper stdout operation when the Monitor RX interrupt is active.

The symptom is that if you add debug console output (puts etc) into the main loop of "VS10X3 Audio Effects" template and its variants, the puts operation gets randomly stuck, halting program operation. The workaround is to disable the RX interrupt before the main loop by adding


somewhere before the main loop.

The error mechanism comes from the combined timing of the stdio library, monitor interrupt and an interruptable interrupt. The stdio library is designed together with the Monitor RX interrupt so that the pipeline timing of VSDSP guarantees execution of both threads so that no RX events are missed. But when an interruptable interrupt such as the audio input interrupt of the aforementioned templates is used, it can cause the RX interrupt to acknowledge RX events the stdio library has not yet registered, thus halting the code.

Sorry for the inconvenience! We'll investigate what would be the best way to fix this in a future release of VSIDE.
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply