When I run my application, I cannot change the value of the the SYSREG and SDRCON registers. If I step through the code, though, I notice my settings are correctly applied. What is the reason for this behaviour?
CraigG wrote: When I run my application, I cannot change the value of the the SYSREG and SDRCON registers. If I step through the code, though, I notice my settings are correctly applied. What is the reason for this behaviour?
The behaviour you are seeing is expected, and is discussed in the TS201 Hardware Reference Manual. When in 'Supervisor Mode', writing multiple times to SYSCON and SDRCON is controlled by the SYS_REG_WE strap. When this strap is set to 0, SYSCON and SDRCON can only be written once in supervisor mode.
However, when the processor is in 'Emulation mode' this allows SYSCON and SDRCON to be written multiple times regardless of the strap setting. SYSCON and SDRCON reside outside of the extended core in the SOC (System On Chip) domain. If an emulation event (halt, breakpoint, or single step, etc.) occurs after a write transaction to these registers has executed but before the transaction gets to the destination register, the write may not be prevented. When you step, you are in Emulation Space, and the SYS_REG_WE strap cannot stop the write from taking place.
If you want to use custom settings for the SYSCON and SDRCON registers when operating in the IDDE, it is recommended that you use a Custom Board Support File to configure these registers. For more information, please see 'Help'->'Contents'->'Emulation Tools'->'Custom Board Support'.
Retrieving data ...