Not able to access to some SFRs in RX62N


I am trying to configure the Hardware of a RX62N and I am not able to change the values of most of the SFRs. Look at this code:

MOV.L                    #08C02DH,R1                                                                      // Set PortD to FF

MOV.B                    #255,[R1]

MOV.L                    #088700H,R1                                                                      // Configure TCR of MTU0 to 02h

MOV.B                    #02H,[R1]

The first part of the code allows me to change the value of the port output. The second part of the code doesn't change the value of the TCR register of the MTU0. I tried to change some other SFRs, just to see if I am able to change their value and I was unsuccessful. I am only allowed to change the port values.

Am I losing any step? Is there any protection on the SFRs?

Thank you


  • Did you enable the peripheral in the Low Power Block?

    All peripherals default to power off at RESET

    that means all the peipheral registers are powered off as well including ports IIRC.

    You might want to look at the example source code for the peripheral libraries.

    There are some registers that one might not think would have to change unless one really reads the reference manual.

  • Many thanks David,

    This is the answer to my problems. I have enabled the peripherals and now everything works fine.