我有一个硬件中断,用于接收AD采集数据,大概就是每128个点触发一次硬件中断,我在调试模块过程中,发现一旦有在console窗口打印消息,我的程序就会少进几次硬件中断,这是为什么呢?
在console窗口打印消息很耗时间? 即使很耗时间,它的优先级也不至于高过硬件中断呀!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我有一个硬件中断,用于接收AD采集数据,大概就是每128个点触发一次硬件中断,我在调试模块过程中,发现一旦有在console窗口打印消息,我的程序就会少进几次硬件中断,这是为什么呢?
在console窗口打印消息很耗时间? 即使很耗时间,它的优先级也不至于高过硬件中断呀!
请看我们e2e工程师的回复,请尝试他的方法。
We need to make changes to the XDC Script (It is the ".cfg" file in the project).
This document explains the XDC Scripting https://www.ti.com/lit/ug/spruex4/spruex4.pdf
For this purpose, please refer to Section 4.3.7
You can set SysMin's bufSize to zero.
var SysMin = xdc.useModule('xdc.runtime.SysMin');
No characters will be written to the internal buffer then. Note: you'll still have some overhead for the System_printf call. If this is too much impact, you can look at using the Log module instead (e.g. Log_print instead of System_printf). You have finer granularity with control over this module.