2399380_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2399380_en-US

2399380_en-US

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

the cs and  clk is  shared .

20 lines mosi connect to 20 dac chips,  can flexio muilt-beat work  under this envirenment ?


Communication & Control(I3C | I2C | SPI | FlexCAN | Ethernet | FlexIO)Re: I want to use flexio to work as a special spi, 20bit mosi output at the same time

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.


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

Hello @justdomyself 


Could you please describe your question in more detail?

Please let us know:

  • Which MCU you are using.
  • How your software is configured.
  • What issue you are encountering.
  • Any additional information that may help us understand the problem.

You are also welcome to describe the issue in Chinese.

Thank you.


BR

Alice


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

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

Tags (1)
No ratings
Version history
Last update:
a week ago
Updated by: