cx3 memory related issues

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
CHCo_4587496
Level 1
Level 1
First reply posted First question asked Welcome!

I am using CX3 RDK Dev A board,

If I build the code this error occurred  section `.data' will not fit in region `DATA', region `DATA' overflowed by 12960 bytes

so i try to modify fx3.ld file as below:

MEMORY

{

I-TCM : ORIGIN = 0x100 LENGTH = 0x3F00

SYS_MEM : ORIGIN = 0x40003000 LENGTH = 0x2D000

DATA : ORIGIN = 0x40030000 LENGTH = 0xD000

}

i also modify #define CY_U3P_MEM_HEAP_BASE         (0x40038000)  to #define CY_U3P_MEM_HEAP_BASE         (0x4003D000)

and build successfully.

but after modification,  i found an new error as below:

AppInit:DmaMultiChannelCreate Err = 0x10

AppInit:MultiChannelReset Err = 0x40

So what I should do to solve the error?

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please confirm that have you changed the #define CY_U3P_SYS_MEM_TOP           (0x40078000) to #define CY_U3P_SYS_MEM_TOP           (0x40080000).

If you don't do so the DMA buffer Area will be reduced by 32 KB as you have increased 32 KB in data area.

If you change the mem top to this  #define CY_U3P_SYS_MEM_TOP           (0x40080000). The DMA area will again be 224 KB  (for 512 KB SRAM) as second stage bootloader ares which is 32 KB will be removed

Error = 0x10 - channel creation

This the memory error when the DMA buffers asked cannot be allocated while creating DMA channel. Please let me know hat is the DMA buffer size, DMA buffer count and how many such channels are you creating.

error = 0x40 channel reset

This error is when the argument passed to the API is not proper. In this case if the DMA channel is not created the DMA  channel reset will also fail.

Please refer to this KBA for understanding Modifying the Default Memory Map in FX3, CX3, FX3S, SD3, FX2G2, and SD2 - KBA229114

Let me know if any queries on this

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
1 Reply
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please confirm that have you changed the #define CY_U3P_SYS_MEM_TOP           (0x40078000) to #define CY_U3P_SYS_MEM_TOP           (0x40080000).

If you don't do so the DMA buffer Area will be reduced by 32 KB as you have increased 32 KB in data area.

If you change the mem top to this  #define CY_U3P_SYS_MEM_TOP           (0x40080000). The DMA area will again be 224 KB  (for 512 KB SRAM) as second stage bootloader ares which is 32 KB will be removed

Error = 0x10 - channel creation

This the memory error when the DMA buffers asked cannot be allocated while creating DMA channel. Please let me know hat is the DMA buffer size, DMA buffer count and how many such channels are you creating.

error = 0x40 channel reset

This error is when the argument passed to the API is not proper. In this case if the DMA channel is not created the DMA  channel reset will also fail.

Please refer to this KBA for understanding Modifying the Default Memory Map in FX3, CX3, FX3S, SD3, FX2G2, and SD2 - KBA229114

Let me know if any queries on this

Regards,

Rashi

Regards,
Rashi
0 Likes