the cs and clk is shared .
20 lines mosi connect to 20 dac chips, can flexio muilt-beat work under this envirenment ?
The chip I used is MCN947.
I need to use FlexIO to simulate SPI control of 20 DACs, each DAC being 24-bit.
The CS and CCK parameters of these 20 DACs are common, but each chip has its own independent MOSI. There is no MISO. Therefore, it is not strictly speaking an SPI, but rather an SPI with 20 MOSIs.
Each time an output is generated, the values of 20 DACs are updated simultaneously.
My idea is to use SHIFBUF to store 1 bit from the 20 DACs, and 8 SHIFBUFs to store 8 bits each.
A single DMA transfer completes the 8-bit data update for 20 DACs.
Three DMA operations were performed to synchronize and update the 24-bit data. Finally, the chip select was raised.
I had this idea, looked at the flexio examples, but didn't know where to start writing the code.
I don't know if you have any relevant examples. I also don't know if my approach is optimal.
Hello @justdomyself
Could you please describe your question in more detail?
Please let us know:
You are also welcome to describe the issue in Chinese.
Thank you.
BR
Alice
Hello @justdomyself
Thanks for your reply.
I'm sorry, but we do not have an example for the MCXN947 with 20 MOSI outputs driving DACs. The available FlexIO examples are primarily designed to emulate a standard SPI interface.
For your application, you will likely need to develop a custom FlexIO driver based on your specific requirements.
You may refer to the following examples as a starting point:
AN14175: Using FlexIO to emulate Quad SPI Controller | NXP Semiconductors
Thank you.
BR
Alice