2399075_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

2399075_en-US

2399075_en-US

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

20 chip dac need  to be controled  at the same time , I want to use flexio  to work as special spi,  to control the dac device. deltails as below:


one  cs ,

one clk, 

20 mosi,   use 20 pins,  to  output dac values to  20 dac devices at the  same time , can you give the  mcuexpross code  and project ?


thanks!


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

Is  the  question two hard  lead to  there is nobody  can give  any suggestions  ?

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

1、 cs pull low level

2、flexio transmit 20 channel mosi evrytime, every channel transmit one bit,  one transmit use one shift register,

3、transmit 8 times use all the 8 shift registers , and every channel transmit  8 bits。

4、step 2 、3 is one  dma  transmit.  use  3 times of dma to transmit 24bit  data every channel, because  the dac chipi is  24bits.

5、pull cs high。


can  this work ok?



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

is   there anybody ?

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

the  chip i use is mcxn947.

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

Hi @justdomyself 

For a similar implementation, I recommend checking the FlexIO QSPI application note AN14175 and the FlexIO SPI DMA examples in the MCUXpresso SDK.

The AN14175 example demonstrates how to use FlexIO timers and shifters to create custom serial interfaces, which is closer to your requirement of driving 20 DAC channels simultaneously with one clock and multiple data outputs.

The FlexIO SPI DMA example is also useful for understanding the basic FlexIO timer, shifter, and DMA configuration.

BR

Harry

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

Where is the project code for AN14175 located? Where can I download it?

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

Hi @justdomyself 

Search | NXP Semiconductors

Please search AN14175 in the NXP official website.

And you can click the Associated File: AN14175SW to download the software.

Harry_Zhang_0-1785384066285.png

BR

Harry

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

An error occurred during import:

justdomyself_0-1785394860116.png


An error occurred during compilation:

justdomyself_1-1785394889652.png

An error occurred during debugging:


justdomyself_2-1785394917545.png


When executing BOARD_PowerMode_OD, the debug function crashes immediately with the error shown in the image above.


Could you provide a newer, working project?


My software version: 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

Hi @justdomyself 

You can download the SDK version corresponding to AN14175.

BR

Harry

标记 (1)
无评分
版本历史
最后更新:
17 小时之前
更新人: