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

USB superspeed peripherals

Anonymous
Not applicable

It is generally accepted that the data section of code in a 512kB FX3 or FX3s is divided roughly into two halves, the first being program and data memory etc, and the second devoted to DMA. Seeing as this quantity of DMA space is excessive for most applications, the ability to expand data memory into this section is attractive. I've done so without catastrophic failure, but I also have several strange problems which I am working through. Can someone please confirm that the FX3 memory can be divided as such without issue?

In "fx3.ld":

MEMORY

{

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

SYS_MEM : ORIGIN = 0x40003000 LENGTH = 0x30000

DATA    : ORIGIN = 0x40033000 LENGTH = 0x12000

}

In "cyfxtx.c"

/*

   The MEM heap is a Memory byte pool which is used to allocate OS objects

   such as thread stacks and memory for message queues. The Cypress FX3

   libraries require a Mem heap size of at least 32 KB.

*/

#define CY_U3P_MEM_HEAP_BASE         ((uint8_t *)0x40045000)

#define CY_U3P_MEM_HEAP_SIZE         (0x8000)

/* The last 32 KB of RAM is reserved for 2-stage boot operation. This value can be changed to

   0x40080000 if 2-stage boot is not used by the application. */

//#define CY_U3P_SYS_MEM_TOP           (0x40078000)

#define CY_U3P_SYS_MEM_TOP           (0x40080000)

0 Likes
1 Solution
alamandaa_16
Moderator
Moderator 10 likes received First like received
Moderator

Hi,

Yes, you can divide Fx3 Memory like as mentioned above.

I have modified the bulksourcesink example to the values mentioned above and build the firmware successfully.

And the device enumeration is also fine.

I attached the example project for your reference.

Please let me know the errors/problems that you have faced in your case.

Regards,

Anil Srinivas

View solution in original post

2 Replies
alamandaa_16
Moderator
Moderator 10 likes received First like received
Moderator

Hi,

Yes, you can divide Fx3 Memory like as mentioned above.

I have modified the bulksourcesink example to the values mentioned above and build the firmware successfully.

And the device enumeration is also fine.

I attached the example project for your reference.

Please let me know the errors/problems that you have faced in your case.

Regards,

Anil Srinivas

Anonymous
Not applicable

Thank you. If there are no underlying hardware issues with arbitrary RAM allocation, my problems are likely unrelated. I have asked about them in separate discussions.

0 Likes