S32K DMA PERIPHERAL

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

S32K DMA PERIPHERAL

2,221件の閲覧回数
hajianik
Senior Contributor I

I know it is possible to periodically trigger DMA on a peripheral source such as SPI RECIEVE FULL/SPI TRANSMIT EMPTY however I was wondering if it  is possible to trigger lets say on TX_EMPTY by doing an explicit start on the channel in the transfer complete interrupt?

I've set up a channel for 4 transfer on the tx_empty flag and it works however I just want to do this over and over again'

so to that end when the 1st DMA interrupt triggers I explicitly start the channel again right there inside the ISR and it does not seem to work. I think for this to work I have to reinitialize the DMA channel again and again.

Any help is much appreciated. 

Thanks,

Koorosh Hajiani

タグ(1)
0 件の賞賛
返信
2 返答(返信)

1,826件の閲覧回数
razva_tilimpea
NXP Employee
NXP Employee

Hi,

I don't know exactly your application, but if you want to configure DMA to handle the LPSPI transfer you can take a look in LPSPI driver from S32SDK. 

Best regards,

Razvan

0 件の賞賛
返信

1,826件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

 

if you want to start the same sequence again then:

- Do not set DREQ (Disable Request) bit in TCD Control and Status

- Initialize SLAST and DLASTSGA, so it restores the source address and destination address to the initial value

Another option is to use Scatter/Gather feature – create own TCD descriptor in RAM memory which is initialized as you need and enable Scatter/Gather by ESG bit in TCD Control and Status. Put the address of your TCD in RAM to DLASTSGA. Once all the defined transfers are completed, your descriptor from RAM will be loaded to TCD and it will continue without user’s intervention.

 

Regards,

Lukas