<?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>Setting SYSCON register before EINIT.</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/17915/setting-syscon-register-before-einit</link><description> Hello, I am trying to initialise the CAN interface on a C164 - I need to set the XPEN bit, and clear the CAN1DIS bit in the SYSCON register. 
 
However, I am using C, and thus C_STARTUP_CODE is loaded into RAM, which contains the EINIT instruction (which</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/122503?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 05:22:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:27a8c72a-a47d-4e8f-a61f-f3e2e2b41cc7</guid><dc:creator>Chris C.</dc:creator><description>&lt;p&gt;Mike, you&amp;#39;re a king among men. SYSCON now reads 0x04, which is great.&lt;br /&gt;
&lt;br /&gt;
My CAN messages still aren&amp;#39;t being sent or received, but at least I&amp;#39;m one step further.&lt;br /&gt;
&lt;br /&gt;
Many thanks,&lt;br /&gt;
&lt;br /&gt;
Chris.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/122479?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 05:20:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:76699973-aec2-479e-9543-628a37de0273</guid><dc:creator>Mik Kleshov</dc:creator><description>&lt;p&gt;By the way, it&amp;#39;s all in the manuals:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/man/docs/c166/c166_ap_startupcode.htm"&gt;http://www.keil.com/support/man/docs/c166/c166_ap_startupcode.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There should be copies of the manuals in PDF format in your Keil distribution.&lt;br /&gt;
&lt;br /&gt;
- mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/111028?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 05:08:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a6187bcb-1f59-4736-9731-835b89087e7a</guid><dc:creator>Mik Kleshov</dc:creator><description>&lt;p&gt;&lt;i&gt;When I open C167S.LIB, I can see the text &amp;quot;C_STARTUP_CODE&amp;quot;, so I assume I have to change the source of this file, and then compile it (?) again.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
If the file START167.A66 is not included in your project, then the default version of it is pulled out of C167S.LIB. Sometimes that will do.&lt;br /&gt;
But normally you need to copy START167.A66 to your program folder and include it in your project. Then customize it to your liking. It will override the code in C167S.LIB.&lt;br /&gt;
&lt;br /&gt;
- mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/96528?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 05:04:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2f53a97b-c953-4fa7-9d19-26eca307dc3a</guid><dc:creator>Mik Kleshov</dc:creator><description>&lt;p&gt;&lt;i&gt;It seems though, that the label given to the SYSCON bit I am interested in has different names in my user-manual (XPEN) and in Start167.A66 (_XRAMEN). Is this an issue?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
It&amp;#39;s hard to say. START167.A66 from my Keil distribution doesn&amp;#39;t have the label _XRAMEN. But it&amp;#39;s not necessarily a problem. Anyway, just make sure that it&amp;#39;s bit number 2 (SYSCON.2). The reason why they could call it _XRAMEN is that on some C16x chips XRAM is the only X-peripheral, if my memory serves me.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;It also seems from some preliminary testing, that setting this bit shuts down my use of RS-232 in testing&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;ve never dealt with a C164, so I really don&amp;#39;t know. Could it be that in your microcontroller CAN pins are multiplexed with UART pins, so it can&amp;#39;t be both at the same time? Or maybe it&amp;#39;s something more subtle.&lt;br /&gt;
&lt;br /&gt;
- mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/111034?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 04:57:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6cb8612d-278f-4f2a-a71c-e670dfbef717</guid><dc:creator>Chris C.</dc:creator><description>&lt;p&gt;During build-time, it seems like the only file the build-process needs is one called C167S.LIB, and putting deliberate errors into the START*.A66 files does nothing.&lt;br /&gt;
&lt;br /&gt;
When I open C167S.LIB, I can see the text &amp;quot;C_STARTUP_CODE&amp;quot;, so I assume I have to change the source of this file, and then compile it (?) again.&lt;br /&gt;
&lt;br /&gt;
The EINIT command it definitely contained within this C_STARTUP stuff, as I can see from the .M66 file. Perhaps the settings for SYSCON are too?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/96545?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 04:45:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:60878ed6-39c2-4bdb-a3f7-8c7fd6ea5158</guid><dc:creator>Chris C.</dc:creator><description>&lt;p&gt;Sorry, cancel that last comment re: RS232.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/72680?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 04:13:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2ada88fd-5f45-4cc1-897b-9c00a7d6c9e4</guid><dc:creator>Chris C.</dc:creator><description>&lt;p&gt;Hi there Mike, thanks for your reply.&lt;br /&gt;
&lt;br /&gt;
Nothing, now that I know which file to get! I&amp;#39;ve been thrown onto this project with the scantest (read: nothing) of documentation and it&amp;#39;s a nightmare. :)&lt;br /&gt;
&lt;br /&gt;
It seems though, that the label given to the SYSCON bit I am interested in has different names in my user-manual (XPEN) and in Start167.A66 (_XRAMEN). Is this an issue?&lt;br /&gt;
&lt;br /&gt;
It also seems from some preliminary testing, that setting this bit shuts down my use of RS-232 in testing (I&amp;#39;m using printf()&amp;#39;s to write register values to screen).. does this seem likely?&lt;br /&gt;
&lt;br /&gt;
Once again, thanks a lot for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting SYSCON register before EINIT.</title><link>https://community.arm.com/thread/42660?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2004 03:14:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6431c834-ed41-4321-b950-1a3ab9fd7385</guid><dc:creator>Mik Kleshov</dc:creator><description>&lt;p&gt;Hi Chris,&lt;br /&gt;
&lt;br /&gt;
What keeps you from modifying START167.A66 ?&lt;br /&gt;
And I&amp;#39;m not sure why you would want to interpret machine code on the reset vectors.&lt;br /&gt;
&lt;br /&gt;
- mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>