memory alignment issue when usb stack and vit demo used together

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

memory alignment issue when usb stack and vit demo used together

ソリューションへジャンプ
5,366件の閲覧回数
ganzo
Contributor II

I'm facing memory alignment issue when VIT demo and USB msd stack used together on freertos with SDRAM as main memory. It is either one or another works depending on the memory configuration. Does anybody face same issue? I also couldn't find decription about USE_SDRAM definition.

ラベル(1)
0 件の賞賛
返信
1 解決策
5,343件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi ganzo:

If you run USB stack on SDRAM,  some key structures should be put to non-cached memory.  Please refer to below link for more details.

https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-NonCached-Memory-on-i-MXRT/ta-p/1183369

 

Regards

Daniel

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
5,329件の閲覧回数
ganzo
Contributor II

Thank you @danielchen,

I have tested with OCRAM with above suggestion. I have configured OCRAM like below. It is 750KB in size.

ganzo_1-1638235873605.png

 

ganzo_0-1638235581210.png

Inside the board/board.c file. region 6 setting changed like below.

    /* Region 6 setting: Memory with Normal type, not shareable, outer/inner write back */

//    MPU->RBAR = ARM_MPU_RBAR(6, 0x20200000U);

//    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_1MB);

to

MPU->RBAR = ARM_MPU_RBAR(6, 0x20240000U);

MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 1, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_1MB);

After that, USB stack is working. I can see the USB thumb drive is mounted. I have little concern about above code. OCRAM size is 750KB. Above code only possible in size of 256KB, 512KB, 1MB. Will that be okay?

Ganzo

0 件の賞賛
返信
5,344件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi ganzo:

If you run USB stack on SDRAM,  some key structures should be put to non-cached memory.  Please refer to below link for more details.

https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-NonCached-Memory-on-i-MXRT/ta-p/1183369

 

Regards

Daniel

 

0 件の賞賛
返信