LPSPI for SPI-adc and SPI-dac for IMXRT1176

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

LPSPI for SPI-adc and SPI-dac for IMXRT1176

ソリューションへジャンプ
998件の閲覧回数
Jeevan
Contributor IV

Hi team,

We are using external SPI related ADC and DAC for our project.

Which is better approach for establishing communication with SPI protocol (interrupt or polling) because we need only SPI transmission for DACs

0 件の賞賛
返信
1 解決策
919件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Jeevan,

Yes, it can still work. Just make sure to initialize the appropriate pin and configure it during the SPI initialization. 

In the case of the lpspi_interrupt_b2b_transfer_slave_cm7 example code from the SDK, you can achieve this by changing "slaveConfig.whichPCS" value from kLPSPI_Pcs0 to kLPSPI_Pcs1:

EdwinHz_0-1725394564329.png

EdwinHz_2-1725394664537.png

BR,
Edwin.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
980件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Jeevan,

SPI polling would be a simpler solution, but it can also require a much higher load of work on the CPU. Interrupt increases the complexity of the transmissions but is much better for performance in the CPU. I would depend on how often you expect an ADC/DAC conversion, and how "real-time" you want this conversion to be processes, but I would recommend using the interrupt method, and basing your code on the example project we provide in our SDKs.

BR,
Edwin.

0 件の賞賛
返信
938件の閲覧回数
Jeevan
Contributor IV

Hi @EdwinHz ,

Thank you for your valuable information.

Just had one query.

Will the SPI communication work from eval board to eval board if chip select 0 selected on one board and chip select 1 selected on another board.

Board connection:

Eval board 1 <--> Eval board 2

CS0 <-> CS1

Clock <-> Clock

MOSI <-> MISO

MISO <-> MOSI

GND <-> GND

0 件の賞賛
返信
920件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Jeevan,

Yes, it can still work. Just make sure to initialize the appropriate pin and configure it during the SPI initialization. 

In the case of the lpspi_interrupt_b2b_transfer_slave_cm7 example code from the SDK, you can achieve this by changing "slaveConfig.whichPCS" value from kLPSPI_Pcs0 to kLPSPI_Pcs1:

EdwinHz_0-1725394564329.png

EdwinHz_2-1725394664537.png

BR,
Edwin.

0 件の賞賛
返信