AnsweredAssumed Answered

SYSCON register (TS-201)

Question asked by Falcon on May 27, 2011
Latest reply on Aug 1, 2012 by jeyanthi.jegadeesan

Hello!

 

For some reason I can't change SYSCON register's value.

Here is a listing of a test code:

 

#include <defts201.h>
#include <sysreg.h>

int main( void )
{
__builtin_sysreg_write(__SYSCON,  SYSCON_HOST_WID64

                                                   | SYSCON_MP_WID64

                                                   | SYSCON_MEM_WID64

                                                   | SYSCON_MSH_PIPE2

                                                   | SYSCON_MSH_WT0 

                                                   | SYSCON_MSH_IDLE
                                                   | SYSCON_MS0_WT3  

                                                   | SYSCON_MS0_SLOW

                                                   | SYSCON_MS0_IDLE
                                                   | SYSCON_MS1_PIPE4); //=0x00389627
return 0;
}

The default value of this register is 0x00189067. I suppose this code to set a new value of 0x00389627 but it does not work. However, if I run with a breakpoint before "return 0" line, SYSCON register's value is changed sucessfully.

 

I have also tried to wait while the register's value is changed reading it in a loop but it never changes:

#include <defts201.h>
#include <sysreg.h>

int SYSCON_value;

int main( void )
{
__builtin_sysreg_write(__SYSCON, SYSCON_HOST_WID64

                                                   | SYSCON_MP_WID64

                                                   | SYSCON_MEM_WID64

                                                   | SYSCON_MSH_PIPE2

                                                   | SYSCON_MSH_WT0

                                                   | SYSCON_MSH_IDLE
                                                   | SYSCON_MS0_WT3 

                                                   | SYSCON_MS0_SLOW

                                                   | SYSCON_MS0_IDLE
                                                   | SYSCON_MS1_PIPE4); //=0x00389627

 

SYSCON_value=__builtin_sysreg_read(__SYSCON);

 

while(SYSCON_value != 0x00389627)  {
     SYSCON_value=__builtin_sysreg_read(__SYSCON);
}               

 

return 0;
}

 

How to change value of this register without using breakpoint and why doesn't the first example work?

 

Thanks in advance.

Attachments

Outcomes