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!
Is the question two hard lead to there is nobody can give any suggestions ?
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?
is there anybody ?
the chip i use is mcxn947.
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
Where is the project code for AN14175 located? Where can I download it?
Please search AN14175 in the NXP official website.
And you can click the Associated File: AN14175SW to download the software.
BR
Harry
An error occurred during import:
An error occurred during compilation:
An error occurred during debugging:
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]
You can download the SDK version corresponding to AN14175.
BR
Harry