Skip to main content
Knowledgebase
Home
Renesas India - Knowledgebase

How to set value to R8C/3x SOF Select Register of S2?

Latest Updated:07/10/2008

Question:

How do I set a value to R8C/3x Series Option Function Select Register 2 (register 0FS2)?

Answer:

The following example shows how to set FF to R8C/3x Series Option Function Select Register 2 (register 0FS2).

  1. C Language Start-up:
    Add the two lines to fvector.c as shown below.

     
  2. Assembler Startup:
    Add the three lines to sect30.inc as shown below.

When applying startup or a project for the R8C/1x or R8C/2x series instead of the R8C/3x series, this setting will cause an overlap error in the section during the link. In this case, change the start address of the variable vector table (vector section) to an address lower than FED8h to avoid an overlap between the variable vector table and the reserved area (register 0FS2).

Suitable Products
C/C++ Compiler Package for M16C Series and R8C Family [M3T-NC30WA]