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.

[参考译文] AM5716:为 DSP 配置 AM5716 Timer5

Guru**** 2540720 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1111139/am5716-configuring-am5716-timer5-for-dsp

器件型号:AM5716

大家好、

这是以下主题的后续操作、我离开了很长时间、主题已锁定。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/991844/am5716-dsp-timer-hangs-a15-during-boot

当前的情况是、Linux 在启动时执行 DSP remoteproc 时仍然挂起。 我对 苏曼·安娜的答复有几个问题,希望有人能帮助我。

1."Linux 负责为计时器启用时钟、您还必须让 Linux 知道要在 Remoteproc 上使用的计时器。"

如何让 Linux 知道我正在将 Timer5用于 Remoteproc 应用程序?  我认为 通过在 dra7-IPI-DSP-common.dtsi 中按如下方式配置器件树、已经通知 Linux DSP1正在使用 Timer5?

dra7-IPI-DSP-common.dtsi 包含在  am571x-idk.dts 器件树文件中。

&dsp1 {
    mboxes = <&mailbox5 &mbox_dsp1_ipc3x>;
    timers = <&timer5>;
    watchdog-timers = <&timer10>;
};

我尝试将以下内容添加到 am571x-idk.dts 中、但它似乎没有帮助。

&timer5 {
    status = "okay";
    ti,no-idle;
};

2."因此、请勿在 Timer_create 函数中使用 Timer_any。 您需要使用一个与系统中其他 dmTimer 不冲突的特定计时器。"

在 main.cpp 文件中、我对以下内容进行了更改。 我知道 Timer5是专门分配给 DSP1的。 将第一个参数更改为"4"不起作用。

// main.cpp

extern "C" {
void timerInterrupt(void) {
// ...
}
}

void main (void) {
// ...

// Init Timer5
Timer_Handle handle;
Timer_Params timerParams;
Timer_Params_init(&timerParams);
timerParams.period = 1000000;
timerParams.periodType = Timer_PeriodType_MICROSECS;
timerParams.startMode = Timer_StartMode_AUTO;

Error_Block eb;
Error_init(&eb);
handle = Timer_create(4, timerInterrupt, &timerParams, &eb);
// ...
}

3."请将选定的计时器添加到相应的 Remoteproc 节点的计时器列表中,以便 Linux OMAP Remoteproc 驱动程序可以请求并打开该计时器的时钟。"

如何将 Timer5添加到"remoteproc 节点的计时器列表"? 是否有人提供了有关如何实现这一目标的示例或文档?

4.如何检查 Timer5是否已分配给 DSP (或未分配给 Linux)? 我是否可以从 Linux 操作系统检查任何文件或日志?

提前感谢您。

此致

Johnathon