2399075_zh-CN

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2399075_zh-CN

2399075_zh-CN

我想使用 Flexio 作为特殊的 SPI,同时输出 20 位 MOSI 信号。

需要同时控制 20 个芯片 DAC,我想使用 Flexio 作为特殊的 SPI 来控制这些 DAC 设备。如下所示:


一个 cs,

一声钟响,

使用 20 个 MOSI 板,通过 20 个引脚同时向 20 个 DAC 设备输出 DAC 值,请问可以提供 MCUEXPROS 代码和项目吗?


谢谢您!


回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

这个问题太难了,是不是没人能给出任何建议?

回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

1、cs拉低级别

2、每次传输20通道MOSI,每个通道传输一位,一次传输使用一个移位寄存器。

3、传输8次,使用全部8个移位寄存器,每个通道传输8位。

4、步骤 2、3 是一次 DMA 传输。使用 3 倍的 DMA 来传输每个通道的 24 位数据,因为 DAC 芯片是 24 位的。

5、拉高 cs。


这样可以吗?



回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

有人在吗?

Re: I want to use flexio to work as a special spi, 20bit mosi output at the same time

我使用的芯片是mcxn947。

回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

嗨@justdomyself

对于类似的实现,我建议查看 FlexIO QSPI 应用笔记 AN14175 和 MCUXpresso SDK 中的 FlexIO SPI DMA 示例。

AN14175 示例演示了如何使用 FlexIO 定时器和移位器创建自定义串行接口,这更接近于您使用一个时钟和多个数据输出同时驱动 20 个 DAC 通道的要求。

FlexIO SPI DMA 示例对于理解 FlexIO 定时器、移位器和 DMA 的基本配置也很有用。

BR

哈里

回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

AN14175    对应的工程代码在哪个位置?从哪下载?

回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

导入的时候报错:

justdomyself_0-1785394860116.png


编译的时候报错:

justdomyself_1-1785394889652.png

debug 的时候报错:


justdomyself_2-1785394917545.png


执行 BOARD_PowerMode_OD   。debug直接崩溃报上图错误。


能不能给个新一点的可以用的工程, 


我的软件版本:MCUXpresso IDE v25.6 [Build 136] [2025-06-27]

回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

嗨@justdomyself

搜索 | 恩智浦半导体

请在NXP官方网站上搜索AN14175。

您可以点击关联文件:AN14175SW 下载该软件。

Harry_Zhang_0-1785384066285.png

BR

哈里

回复: I want to use flexio to work as a special spi, 20bit mosi output at the same time

嗨@justdomyself

您可以下载与 AN14175 对应的 SDK 版本。

BR

哈里

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎08-13-2026 05:29 PM
更新者: