How to configure external FLASH for FX3/CX3 (CYUSB3065)

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

cross mob
LeLv_4519926
Level 1
Level 1

Question 2: How to configure external FLASH for FX3/CX3 (CYUSB3065)           

I use (CYUSB3065) here, and then hang an 8MB FLASH outside the chip. At present, it's no problem to start the burning, but when I modify the space configuration, it can't be realized and it can't start when burning in.           

The content of the revision includes two aspects:           

1. Compiled configuration files: C: Program Files (x86) Cypress EZ-USB FX3 SDK 1.3 firmware/common/fx3.ld           

Before amendment, it read as follows:           

I-TCM: ORIGIN = 0x100 LENGTH = 0x3F00            SYS_MEM: ORIGIN = 0x40003000 LENGTH = 0x2D000            DATA: ORIGIN = 0x40030000 LENGTH = 0x8000           

Amended as follows:           

I-TCM: ORIGIN = 0x100 LENGTH = 0x3F00            SYS_MEM: ORIGIN = 0x40003000 LENGTH = 0x2E000            DATA: ORIGIN = 0x40031000 LENGTH = 0x8000           

2. cyxtx.c           

Before modification:  define CY_U3P_MEM_HEAP_BASE ((uint8_t*) 0x40038000)           

After modification:  define CY_U3P_MEM_HEAP_BASE ((uint8_t*) 0x40039000)           

Excuse me: How can we use external FLASH to store code so that the size of code is not limited by space?

0 Likes
1 Solution

Hello Leo,

As you are aware , CX3 RAM size is 512 KB, so it not possible to program RAM with .img file of size 600 KB.

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
10 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Can you provide us the .img files before and after amendments, for reproducing the same issue on our side.

Also provide the (.map) file.

Actually,this kind of issue is not expected due to the changes you made.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello

Thank you for your fast respon.

Will share this file to you later.

Leo Lv

0 Likes
lock attach
Attachments are accessible only for community members.

Hello

The attachment is the .img&.map file,plz help check whether it's helpful to analysis this issue,thank you!

BR

Leo Lv

0 Likes

Hello Leo,

- I am not able to extract the files. Can you re send them?

- Can you try programming with bulksrcsink example from SDK.( with the modifications mentioned in previous post)

or

- Please let me know whether you are using SPI Flash or I2C Flash. Also try programming USBSpiRegMode example if you are using SPI Flash (with the modifications you mentioned in previous post)

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hello Rashi

Just resend this file,please try again,any problem let me know,thanks!

Leo

0 Likes

Hello Leo,

I tried programming SPI Flash with both .img files you shared, its working fine at my end.

For changing the code area, please refer to this thread Out of CX3 memory

Please let me know if any other queries.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi

Just refered to this thread Out of CX3 memory ,but some issue need your help to analysis yet.

1.Its working fine at your end,while need your help to confirm the bellow information:

A. Could you please help to confirm which version of the original terminal is used in your test(our is See3CAM_CX3RDK)?           

B. Could you please briefly describe the original test method in your side?

2. Can you provide the detailed description or data of the external flash configuration?

(There is no such data in the link provided by you, and the flash size we use is 1MB / 8MB, how to configure it to make full use of it? According to the previous configuration, only RAM -- 512KB is configured)?           

3. Our external flash uses w25q80ew. Does this have any impact?     

      

Thank you for your help,looking forward your feedback ! 

Leo

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Leo,

Please refer to this KBA for Flash Selection Selection of SPI Flash Compatible with FX3/CX3/FX3S/FX2G2/SD3/SD2 and the Recommended Cypress SPI Fl...

- for checking the compatibility, please program the RAM with UsbSpiDmaMode/ UsbSpiRegMode examples in the SDK and try passing the vendor commands to read and write data to the flash. You can refer to readme.txt file in the example project.

- I had checked programming the image (.img) file you shared o the Denebola kit.

- You are changing the System Memory size as you code size is bigger than the default memory size. Please confirm.

- The .ld file or code memory size should only be change if the code size is big enough than the code area

- You can try building the firmware in release mode, this would reduce the .img file size.

There is no such data in the link provided by you, and the flash size we use is 1MB / 8MB, how to configure it to make full use of it? According to the previous configuration, only RAM -- 512KB is configured

>> You don't need to change .ld or Code Memory size file because you are using Flash of different sizes.

The size of .img file, that you shared in previous post, is 205 KB. For CX3 the system memory is 512 KB out of which the code area is 180 KB

So, code area need to be increased. As, the second stage boot loader is not being used we can merge 32 KB to the Code memory.

We nee to make changes in fx3.ld file and also cyfxtx.c file

Please use the attached cyfxtx.c and fx3.ld file. Replace the cyfxtx.x file in your project and give the path to the fx3.ld file in the Linker settings.

  Descriptor area    Base: 0x40000000 Size: 12  KB

  Code area          Base: 0x40003000 Size: 212 KB

  Data area          Base: 0x40038000 Size: 32  KB

  Driver heap        Base: 0x40040000 Size: 32  KB

  Buffer area        Base: 0x40048000 Size: 224 KB // DMA is same.

  2-stage boot area  Base: 0x40080000 Size: 0  KB

Please let me know the results of this test.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi

Thanks your information.

I think maybe some difference between our concern about this issue.(Internal and external storage)

So summarize the problem,may make it clearly:

If our code size is 600KB, then our external SPI flash is 1MB, can the chip meet the requirements, if so, how to configure

Leo

0 Likes

Hello Leo,

As you are aware , CX3 RAM size is 512 KB, so it not possible to program RAM with .img file of size 600 KB.

Regards,

Rashi

Regards,
Rashi
0 Likes