Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 36216

Re: BF518 Timer WDTH_CAP mode problem

$
0
0

Hi Jin,

 

It is generally recommend that, where possible, you avoid making use of printf() - or any STDIO for that matter - over JTAG when running code that requires precision timing. The default stdio device, which is used to print to the IDDE, or allow you to perform file IO on the local PC filesystem interferes with the real-time execution of an application. The processor needs to be halted at every IO operation, and even though this may only take a small amount of time, it will often be noticeable in the 'real world' (whether that shows itself through your scope, or through stuttering in audio or video processing, etc).

 

There is some detailed information in FAQ: VisualDSP++ STDIO is slow, and interrupts processing of real-world data which should clarify this behaviour. Because the halt only halts the core during each of these operations, the peripherals (such as your timers) will keep incrementing. They may surpass the threshold for the timer interrupt while the core is halted - the interrupt will be latched, but won't be processed until the core runs again by which time the timer will have continued to increase and may be outside of your 'ideal value' range above.

 

Regards,

Craig.


Viewing all articles
Browse latest Browse all 36216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>