CY7C64713 : accessing endpoint RAM directly

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

cross mob
Anonymous
Not applicable
        I'm using the CY7C64713, I only need Endpoint0 and Endpoint1..   
I would like to use the 4KBytes of RAM, available for unused endpoints 2,4,6,8 as regular data RAM. Is this possible?   
It seems like I can use following chunks without problem :   
0xF000-0xF3FF   
0xF400-0xF5FF   
0xF800-0XFBFF   
0xFC00-0xFBFF   
I can't read/write correctly in the chunks   
0xF600-0xF7FF   
0xFC00-0xFFFF   
Why is this? How should I configure the unused endpoints (EP2CFG ... EP8CFG) in order to enable use of the complete block of RAM?   
   
Thanks!   
0 Likes
7 Replies
Anonymous
Not applicable
        Correction :   
accessible/usable blocks : 0xF000-0xF5FF and 0xF800-0XFDFF   
unusable blocks : 0xF600-0xF7FF and 0xFE00-0xFFFF   
   
   
0 Likes
Anonymous
Not applicable

you cannot convert endpoint buffers to usable blocks... 

0 Likes
Anonymous
Not applicable
        Thanks for replying, Aasi!   
Actually, I am already using most parts of the endpoint memory as regular data ram, this seems to work without problem. However I do notice that changing the endpoint configuration makes some parts of the memory unusable. I just can't find any logical relation between endpoint configuration and "freely usable" memory, and I wonder if there is a configuration which enables to use all memory (without using any endpoint functionality). I guess you are right, I might be using "unsupported" functionality which is not a wise thing to do - my current design unfortunately has grown so much that I'm in desperate need of extra data memory without doing a hardware redesign...   
0 Likes
Anonymous
Not applicable
        See Chapter 8.5 of the Technical Reference Manual.   
   
Endpoint buffers are always at least double-buffered. The problem you have uncovered is that in order to accurately support double-buffering, you only get to directly access half of the buffer.   
   
So, for instance, Endpoint 4's buffer space goes from 0xF400-0xF7FF - 1024 bytes. Because you have EP4 configured as double-bufferd 512-bytes, you only get to access 0xF400-0xF5FF. The FX2 manipulates the other half of the buffer to provide the appearance of double-buffering.   
   
You can try setting the EPxCFG bit 7 to 0 (the "valid" bit). This may or may not affect the situation.   
0 Likes
Anonymous
Not applicable
        Thanks andrewsobotka, you are spot on!   
With this info of chapter 8.5 in mind, I had another look at the ram organization (fig.1-16 of the same manual) for the 12 possible configurations. There are a few configurations, which allow the CPU to access 0xF000-0xF3FF (EP2 double buffered 1024 bytes) and 0xF800-0xFBFF (EP6 double buffered 1024 bytes). Same for 0xF400-0xF5FF (EP4 double buffered 512 bytes) and 0xFC00-0xFDFF (EP8 double buffered 512 bytes). The 2 remaining memory regions are never used as "primary" memory in a double- or quad-buffered config. This must be the reason why I can't access exactly those 2 chunks, even when all endpoints are disabled ("valid" bit set to zero). Thanks for opening my eyes !   
   
   
0 Likes
Anonymous
Not applicable
        You could also try configuring EP2 as quad-buffered 1024-byte and see if the memory opens up for you. Try doing it with the valid bit set and clear. It might be the case that quad-1024 will open up everything for access, and clearing valid will ensure that no activity causes the buffers to flip.   
0 Likes
Anonymous
Not applicable
        I believe I tried that before, but to make sure I retested this configuration (EP2 quad-buffered 1024) - it doesn't work. Which actually confirms what you pointed out earlier: I can only access the "first" memory chunk in a dual/triple/quad buffered configuration.   
0 Likes