<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>memeory settings FX2</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25918/memeory-settings-fx2</link><description> 
I have implemented an SPI interface in Cypress FX2. I have
problems in giving the XDATA and CODE. I gave the settings as CODE -
0X80-0X0fff and XDATA 0X1000. But when I program it ,Iam not able to
see the SCLK. IS anything wrong with the memory settings</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/125638?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2009 05:52:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ec821206-ceb5-45bc-947c-d5155f28d126</guid><dc:creator>punitha kutti</dc:creator><description>&lt;p&gt;&lt;p&gt;
I solved the problem finally. The IOE in FX2 is located in direct
memory access region. The indirect addressing (movx @DPTR, A ) was
causing problem. Simply it can be written as mov 0xB1,A. DPTR is not
required as it is used to access external memory.&lt;br /&gt;
Vanitha&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/115142?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2009 07:30:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3880b38a-689f-4e2e-9fc0-309984980e42</guid><dc:creator>punitha kutti</dc:creator><description>&lt;p&gt;&lt;p&gt;
I have code for spibytewrite only .Iam using PORT E.PE.0 is my
SCLK and PE.7 is my SDO and PE.3 is my CS.&lt;/p&gt;

&lt;pre&gt;
?PR?SPIWRITEBYTE?MODULE segment code
 ?DT?SPIWRITEBYTE?MODULE segment data overlayable

 PUBLIC _spiwritebyte, ?_spiwritebyte?BYTE

 rseg ?DT?SPIWRITEBYTE?MODULE
 ?_spiwritebyte?BYTE:
 d: ds 1

 rseg ?PR?SPIWRITEBYTE?MODULE

 CLKHIGH equ 00000001B ;Bitmask to turn clk pin high
 CLKLOW equ  11111110B ;Bitmask to turn clk pin low
 BITHIGH equ 10000000B ;Bitmask to turn out pin high
 BITLOW equ  01111111B ;Bitmask to turn out pin low

 IOE XDATA 0xB1 ;7F98H

 _spiwritebyte:

 mov DPTR,#IOE ;point to IOE
 mov R6, #8 ;set up loop
 loop:
 mov A, R7 ;move data to send to A
 rrc A ;rotate left through carry to send LSB first
 mov R7, A ;save rotated
 movx A, @DPTR ;setup to change bit
 jc highbit ;if bit is high jump
 anl A, #BITLOW ;else set bit low
 sjmp skip ;skip setting bit high
 highbit:
 orl A, #BITHIGH ;set out high and clock
 skip:
 orl A, #CLKHIGH ;set clock bit high
 movx @DPTR, A ;output data
 nop ;may need this to stretch clock high time
 anl A, #CLKLOW ;set clock low
 movx @DPTR, A ;output low clock
 djnz R6, loop ;repeat eight times
 ret
 end
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
Vanitha&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/103333?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2009 07:20:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1859ecb3-a2ea-466f-ad10-5e1a56104330</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;gt;I am using port E , I have already replaced OUTC by
IOE(0xB1).&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Maybe, some bug of your code disturbs it.&lt;br /&gt;
Post your code for the asm routine, spiwritebyte and spireadbyte&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;gt;Now Iam also re enumerating the FX2. I have used TD_Init()
and TD_poll() in the coding .&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Re-enumeration is not required, when you don&amp;#39;t use USB on FX2.&lt;br /&gt;
As you are testing a short code on MON51 debugger, TD_Init() and
TD_poll() is also not required.&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/77654?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2009 04:12:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7636d431-201c-4bb6-a948-0961c5df9e16</guid><dc:creator>punitha kutti</dc:creator><description>&lt;p&gt;&lt;p&gt;
BIT banging seems to be very slow .I cant se anything on
scope.&lt;/p&gt;

&lt;p&gt;
vanitha&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/115140?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2009 00:39:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:649ba0a2-ab9e-4d25-b52c-ed441475f199</guid><dc:creator>punitha kutti</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am using port E , I have already replaced OUTC by IOE(0xB1). Now
Iam also re enumerating the FX2. I have used TD_Init() and TD_poll()
in the coding . Still I have problems .&lt;br /&gt;
Vanitha&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/103334?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2009 16:28:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:56e8ccbf-2494-4021-8bba-68d8af9e8af9</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;p&gt;
The target MCU of AN1068 is the original EZ-USB (Anchor
AN2131).&lt;br /&gt;
Therefore, you have to rewrite the code intensively for FX2(LP).&lt;/p&gt;

&lt;p&gt;
In this appnote, port C is assigned to the bit-banging port.&lt;br /&gt;
The original EZ-USB maps port C on XDATA area (OUTC: 0x7F98).&lt;br /&gt;
FX2(LP) places it on the register area (IOC: 0xA -
bit-addressable).&lt;br /&gt;
It is the reason the code doesn&amp;#39;t work.&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/77655?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2009 08:47:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:028b2a76-ee49-44bc-b4f2-c7e066662eeb</guid><dc:creator>punitha kutti</dc:creator><description>&lt;p&gt;&lt;p&gt;
I have written a software SPI refering the application note
AN-1068 from cypress. I did not use the file FW.C and other files
that is needed for reenumeration. Should I re enumerate the FX2 for
proper functioning ?&lt;br /&gt;
Thanks&lt;br /&gt;
Vanitha&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memeory settings FX2</title><link>https://community.arm.com/thread/56594?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2009 05:11:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2471edd0-2c4a-408f-824d-0d8a23c02fd0</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;gt; I have implemented an SPI interface in Cypress
FX2.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
How did you implement SPI?&lt;br /&gt;
EZ-USB FX2(LP) doesn&amp;#39;t have any on-chip SPI.&lt;br /&gt;
Did you connect an external SPI chip?&lt;br /&gt;
Or, did you trick the UART as this app note shows, or bit
banging?&lt;/p&gt;

&lt;p&gt;
&amp;quot;SPI Implementation Using Serial Mode 0 on EZ-USB - AN1067&amp;quot;&lt;br /&gt;
&lt;a target="_blank" href="http://www.cypress.com/?rID=12909"&gt;www.cypress.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;gt; I have problems in giving the XDATA and CODE. I gave the
settings as CODE - 0X80-0X0fff and XDATA 0X1000.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Did you see any error on the linker log?&lt;br /&gt;
If not, it sounds like fine.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;gt; But when I program it ,Iam not able to see the SCLK. IS
anything wrong with the memory settings .&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Did you see any other trouble than SCLK?&lt;br /&gt;
Other functions - like USB enumeration - works fine?&lt;br /&gt;
Why do you think the trouble is related to the memory setting?&lt;/p&gt;

&lt;p&gt;
Information is too short to comment something helpful.&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>