SDMA1 -> FlexSPI -> QSPIB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SDMA1 -> FlexSPI -> QSPIB

1,980 次查看
christoph_fauck
Contributor II

Hi,

I would like to feed the FlexSPI/QSPIB with data using a SDMA channel and still have some trouble with it.

My program runs on the CM4 core of a MIMX8MM6 SoC.

I started with the memory_to_memory SDMA example which works fine. Then I adapted to FlexSPI looking in the ecspi sdma_loopback_transfer example.

But after starting the FlexSPI I see the output of the Command byte, but then the transfer stops, keeping CSn low. The Interrupt callback from SDMA is beeing called.

FlexSPI by filling TFDR manually works. Then I changed IPTXFCR[TXDMAEN] = 1 and IPTXFCR_TXWMRK = 0

I am using in SDMA_PrepareTransfer():

sdmaChannel = 1
sdmaEventSource = 36 // for qspi1/DMA tx request
sdmaPriority = 2

srcAddr = (uint32_t) u8array
dstAddr = (uint32_t) FLEXSPI->TFDR

srcWidth = 4
dstWidth = 4

bytesEachRequest = ( IPTXFCR_TXWMRK + 1) * 8

kSDMA_MemoryToPeripheral and kSDMA_PeripheralNormal

Is this possible in that way? 

Thanks and regards
Christoph

标记 (3)
0 项奖励
回复
4 回复数

1,394 次查看
Stan88
Contributor I

@christoph_fauck 

Good day. I have the same situation on IMX8MP. Did you resolve your issue?

Regards, Stanislav.

0 项奖励
回复

1,952 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello christoph

scripts are run by sdma core which has own memory map,

so correct is section 2.4, DMA Memory Map. Also may be useful to look at

some sdma examples in Github SDK
https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK

MX6UL  FreeRTOS  SDK2.2
Board Support Packages (7)

Regards

0 项奖励
回复

1,946 次查看
christoph_fauck
Contributor II

Hi,

thanks. I am working on i.MX8, so looking to the i.MX6 projects didn't help, because the FlexSPI is different.

BR Christoph

0 项奖励
回复

1,979 次查看
christoph_fauck
Contributor II

... and I am using SDMAARM1.

0 项奖励
回复