SDMA1 -> FlexSPI -> QSPIB

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

SDMA1 -> FlexSPI -> QSPIB

1,832 Views
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

Tags (3)
0 Kudos
Reply
4 Replies

1,246 Views
Stan88
Contributor I

@christoph_fauck 

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

Regards, Stanislav.

0 Kudos
Reply

1,804 Views
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 Kudos
Reply

1,798 Views
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 Kudos
Reply

1,831 Views
christoph_fauck
Contributor II

... and I am using SDMAARM1.

0 Kudos
Reply