Can't DMA to off-chip Memory

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

Can't DMA to off-chip Memory

ソリューションへジャンプ
2,154件の閲覧回数
pmt
Contributor V

Hello,

I have written an DMA SPI driver in MQX (but not MQX's driver), however I can't get the DMA to write to externally configured (FlexBus) SRAM.  Writes to internal memory works fine.  I'm using the K60 processor.

I'm sure there is a protection bit somewhere preventing this, but given the number of peripherals that could effect this (SIM, Flexbus, DMA, Crossbar Swtich, MPU, AIPS), I wanted to put this question to the group in the hopes someone would just know.  I have FBSEL set to allow off-chip code and data access.  Non-DMA off-chip access works fine.

Thanks!

PMT

タグ(4)
0 件の賞賛
返信
1 解決策
1,904件の閲覧回数
pmt
Contributor V

Problem found.  DMA does not interact with cache.  Cache flushes are needed when DMA'ing into cacheable regions.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,904件の閲覧回数
soledad
NXP Employee
NXP Employee

Hi,

MQX 4.0.2 Kinetis BSPs are prepared for use with DMA. Make sure that you enable DMA for SPI modules in your user configuration. In user config.h, make sure you configure:

  BSPCFG_DSPI0_USE_DMA 1

  BSPCFG_DSPI1_USE_DMA 1

  BSPCFG_DSPI2_USE_DMA 1

build time options. Then build BSP with these configuration. For source code effects, check init_spi.c in the /mqx/source/bsp/

Regards

Sol

0 件の賞賛
返信
1,905件の閲覧回数
pmt
Contributor V

Problem found.  DMA does not interact with cache.  Cache flushes are needed when DMA'ing into cacheable regions.

0 件の賞賛
返信