+++ /dev/null
-/***********************************************************************************************************************\r
-* DISCLAIMER\r
-* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No \r
-* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all \r
-* applicable laws, including copyright laws. \r
-* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING\r
-* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, \r
-* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM \r
-* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES \r
-* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS \r
-* SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r
-* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of \r
-* this software. By using this software, you agree to the additional terms and conditions found by accessing the \r
-* following link:\r
-* http://www.renesas.com/disclaimer \r
-*\r
-* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved. \r
-***********************************************************************************************************************/\r
-/***********************************************************************************************************************\r
-* File Name : flash_options.c\r
-* Device(s) : RX63x\r
-* Description : Some options of the RX63x are set through registers that are found in ROM. These registers and options\r
-* are defined in the 'Option-Setting Memory' section of the HW Manual. These memory locations are defined\r
-* below with descriptions of what is being set.\r
-***********************************************************************************************************************/\r
-/***********************************************************************************************************************\r
-* History : DD.MM.YYYY Version Description\r
-* : 31.10.2011 1.00 First Release\r
-* : 13.03.2012 1.10 USER_BOOT_ENABLE macro from r_bsp_config.h is now used to set Option-Setting Memory\r
-* area to boot into User Boot Mode.\r
-***********************************************************************************************************************/\r
-\r
-/***********************************************************************************************************************\r
-Includes <System Includes> , "Project Includes"\r
-***********************************************************************************************************************/\r
-/* Used for fixed-width typedefs. */\r
-#include <stdint.h>\r
-/* Determines whether user boot is used or not. */\r
-#include "platform.h"\r
-\r
-/* The UB Code A, UB Code B, and Endian select register B (MDEB) are located in the User Boot space. Immediately\r
- following the MDEB register is the User Boot Reset Vector so it is defined below as well. These settings will only\r
- be used when the MCU is reset in User Boot Mode. In order for the MCU to start up in User Boot Mode the following\r
- conditions must be met:\r
- 1) UB code A is 55736572h and 426F6F74h.\r
- 2) UB code B is FFFF FF07h and 0008 C04Ch.\r
- 3) The low level is being input on the MD pin.\r
- 4) The high level is being input on the PC7 pin. \r
- Please see the Option-Setting Memory section of your MCU's HW manual for more information. */\r
-\r
-/* 0xFF7FFFE8 - 0xFF7FFFEF : UB Code A register \r
- 0xFF7FFFF0 - 0xFF7FFFF7 : UB Code B register\r
- 0xFF7FFFF8 - 0xFF7FFFFB : MDEB register\r
- 0xFF7FFFFC - 0xFF7FFFFF : User Boot Reset Vector */\r
-\r
-#pragma address user_boot_settings = 0xFF7FFFE8\r
-\r
-#if USER_BOOT_ENABLE == 1\r
-extern void PowerON_Reset_PC(void);\r
-\r
-/* Use this array if you are using User Boot. Make sure to fill in valid address for UB Reset Vector. */\r
-const uint32_t user_boot_settings[6] = \r
-{\r
- 0x55736572, //Required setting for UB Code A to get into User Boot\r
- 0x426f6f74, //Required setting for UB Code A to get into User Boot\r
- 0xffffff07, //Required setting for UB Code B to get into User Boot\r
- 0x0008c04c, //Required setting for UB Code B to get into User Boot\r
- /* Choose endian for user application code\r
- MDEB Register - Endian Select Register B\r
- b31:b3 Reserved (set to 1)\r
- b2:b0 MDE - Endian Select (0 = Big Endian, 7 = Little Endian) */ \r
- 0xFFFFFFFF, //Select Little Endian for User Boot Code \r
- (uint32_t) PowerON_Reset_PC //This is the User Boot Reset Vector. When using User Boot put in the reset address here\r
-};\r
-#endif\r
-\r
-/* The Endian select register S (MDES), Option function select register 1 (OFS1), and Option function select register 0\r
- (OFS0) are located in User ROM. */\r
-\r
-/* 0xFFFFFF80 - 0xFFFFFF83 : MDES register\r
- 0xFFFFFF84 - 0xFFFFFF87 : Reserved space (0xFF's)\r
- 0xFFFFFF88 - 0xFFFFFF8B : OFS1 register\r
- 0xFFFFFF8C - 0xFFFFFF8F : OFS0 register */\r
-\r
-#pragma address flash_options = 0xFFFFFF80\r
-\r
-const uint32_t flash_options[] = \r
-{\r
- /* Choose endian for user application code\r
- MDES Register - Endian Select Register S\r
- b31:b3 Reserved (set to 1)\r
- b2:b0 MDE - Endian Select (0 = Big Endian, 7 = Little Endian) */\r
- 0xFFFFFFFF, //Little Endian chosen for User Application\r
- 0xFFFFFFFF, //Reserved space\r
- /* Configure whether voltage detection 0 circuit and HOCO are enabled after reset. \r
- OFS1 - Option Function Select Register 1 \r
- b31:b9 Reserved (set to 1)\r
- b8 HOCOEN - Enable/disable HOCO oscillation after a reset (0=enable, 1=disable)\r
- b7:b3 Reserved (set to 1)\r
- b2 LVDAS - Choose to enable/disable Voltage Detection 0 Circuit after a reset (0=enable, 1=disable)\r
- b1:b0 Reserved (set to 1) */\r
- 0xFFFFFFFF, //Both are disabled.\r
- /* Configure WDT and IWDT settings. \r
- OFS0 - Option Function Select Register 0 \r
- b31:b29 Reserved (set to 1)\r
- b28 WDTRSTIRQS - WDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU)\r
- b27:b26 WDTRPSS - WDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use)\r
- b25:b24 WDTRPES - WDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use)\r
- b23:b20 WDTCKS - WDT Clock Frequency Division Ratio - (1=/4, 4=/64, 0xF=/128, 6=/512, 7=/2048, 8=/8192)\r
- b19:b18 WDTTOPS - WDT Timeout Period Select - (0=1024 cycles, 1=4096, 2=8192, 3=16384)\r
- b17 WDTSTRT - WDT Start Mode Select - (0=auto-start after reset, halt after reset)\r
- b16:b15 Reserved (set to 1)\r
- b14 IWDTSLCSTP - IWDT Sleep Mode Count Stop Control - (0=can't stop count, 1=stop w/some low power modes)\r
- b13 Reserved (set to 1)\r
- b12 IWDTRSTIRQS - IWDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU)\r
- b11:b10 IWDTRPSS - IWDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use)\r
- b9:b8 IWDTRPES - IWDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use)\r
- b7:b4 IWDTCKS - IWDT Clock Frequency Division Ratio - (0=none, 2=/16, 3 = /32, 4=/64, 0xF=/128, 5=/256)\r
- b3:b2 IWDTTOPS - IWDT Timeout Period Select - (0=1024 cycles, 1=4096, 2=8192, 3=16384)\r
- b1 IWDTSTRT - IWDT Start Mode Select - (0=auto-start after reset, halt after reset)\r
- b0 Reserved (set to 1) */\r
- 0xFFFFFFFF\r
-};\r
-\r