FSP Configuration
  Board "Custom User Board (Any Device)"
  R7FA4M2AD3CNE
    part_number: R7FA4M2AD3CNE
    rom_size_bytes: 524288
    ram_size_bytes: 131072
    data_flash_size_bytes: 8192
    package_style: QFN
    package_pins: 48
    
  RA4M2
    series: 4
    
  RA4M2 Family
    Security: Exceptions: Exception Response: Non-Maskable Interrupt
    Security: Exceptions: BusFault, HardFault, and NMI Target: Secure State
    Security: System Reset Request Accessibility: Secure State
    Security: Exceptions: Prioritize Secure Exceptions: Disabled
    Security: Cache Accessibility: Both Secure and Non-Secure State
    Security: System Reset Status Accessibility: Both Secure and Non-Secure State
    Security: Battery Backup Accessibility: Both Secure and Non-Secure State
    Security: SRAM Accessibility: SRAM Protection: Both Secure and Non-Secure State
    Security: SRAM Accessibility: SRAM ECC: Both Secure and Non-Secure State
    Security: SRAM Accessibility: Standby RAM: Regions 7-0 are all Secure.
    Security: BUS Accessibility: Bus Security Attribution Register A: Both Secure and Non-Secure State
    Security: BUS Accessibility: Bus Security Attribution Register B: Both Secure and Non-Secure State
    Security: Uninitialized Non-Secure Application Fallback: Enable Uninitialized Non-Secure Application Fallback
    Startup C-Cache Line Size: 32 Bytes
    OFS0 register settings: Independent WDT: Start Mode: IWDT is Disabled
    OFS0 register settings: Independent WDT: Timeout Period: 2048 cycles
    OFS0 register settings: Independent WDT: Dedicated Clock Frequency Divisor: 128
    OFS0 register settings: Independent WDT: Window End Position:  0% (no window end position)
    OFS0 register settings: Independent WDT: Window Start Position: 100% (no window start position)
    OFS0 register settings: Independent WDT: Reset Interrupt Request Select: Reset is enabled
    OFS0 register settings: Independent WDT: Stop Control: Stop counting when in Sleep, Snooze mode, or Software Standby
    OFS0 register settings: WDT: Start Mode Select: Stop WDT after a reset (register-start mode)
    OFS0 register settings: WDT: Timeout Period: 16384 cycles
    OFS0 register settings: WDT: Clock Frequency Division Ratio: 128
    OFS0 register settings: WDT: Window End Position:  0% (no window end position)
    OFS0 register settings: WDT: Window Start Position: 100% (no window start position)
    OFS0 register settings: WDT: Reset Interrupt Request: Reset
    OFS0 register settings: WDT: Stop Control: Stop counting when entering Sleep mode
    OFS1 register settings: Voltage Detection 0 Circuit Start: Voltage monitor 0 reset is enabled after reset
    OFS1 register settings: Voltage Detection 0 Level: 2.80 V
    OFS1 register settings: HOCO Oscillation Enable: HOCO oscillation is enabled after reset
    Block Protection Settings (BPS): BPS0: 
    Permanent Block Protection Settings (PBPS): PBPS0: 
    Clocks: HOCO FLL Function: Disabled
    Main Oscillator Wait Time: 8163 cycles
    
  RA Common
    Main stack size (bytes): 0x400
    Heap size (bytes): 0x400
    MCU Vcc (mV): 3300
    Parameter checking: Enabled
    Assert Failures: Return FSP_ERR_ASSERTION
    Error Log: No Error Log
    Clock Registers not Reset Values during Startup: Disabled
    Main Oscillator Populated: Populated
    PFS Protect: Enabled
    C Runtime Initialization : Enabled
    Early BSP Initialization : Disabled
    Main Oscillator Clock Source: Crystal or Resonator
    Subclock Populated: Populated
    Subclock Drive (Drive capacitance availability varies by MCU): Standard/Normal mode
    Subclock Stabilization Time (ms): 1000
    
  Clocks
    XTAL 24000000Hz
    HOCO 20MHz
    PLL Src: XTAL
    PLL Div /3
    PLL Mul x25.0
    PLL2 Src: XTAL
    PLL2 Div /2
    PLL2 Mul x20.0
    Clock Src: PLL
    CLKOUT Disabled
    UCLK Src: PLL2
    ICLK Div /2
    PCLKA Div /2
    PCLKB Div /4
    PCLKC Div /4
    PCLKD Div /2
    FCLK Div /4
    CLKOUT Div /1
    UCLK Div /5
    
  Pin Configurations
    R7FA4M2AD3CNE.pincfg -> g_bsp_pin_cfg
      AVCC0 42 ANALOG0_AVCC0 - - - - - - - - IO "Read only" - 
      AVSS0 43 ANALOG0_AVSS0 - - - - - - - - IO "Read only" - 
      P000 48 - - - - Disabled - - "ADC0: AN000; ICU0: IRQ06" - なし - - 
      P001 47 - - - - Disabled - - "ADC0: AN001; ICU0: IRQ07" - なし - - 
      P002 46 - - - - Disabled - - "ADC0: AN002; ICU0: IRQ08" - なし - - 
      P013 40 - - - - Disabled - - "ADC0: AN011; ANALOG0: VREFL" - なし - - 
      P014 39 - - - - Disabled - - "ADC0: AN012; DAC0: DA0" - なし - - 
      P015 38 - - - - Disabled - - "ADC0: AN013; DAC1: DA1; ICU0: IRQ13" - なし - - 
      P100 36 - - - - Disabled - - "AGT0: AGTIO0; GPT_POEG0: GTETRGA; GPT5: GTIOC5B; ICU0: IRQ02; QSPI0: QSPCLK; SCI0: RXD0; SCI0: SCL0; SCI1: SCK1" - なし - - 
      P101 35 - - - - Disabled - - "AGT0: AGTEE0; GPT_POEG1: GTETRGB; GPT5: GTIOC5A; ICU0: IRQ01; QSPI0: QIO1; SCI0: SDA0; SCI0: TXD0; SCI1: CTSRTS1" - なし - - 
      P102 34 - - - - Disabled - - "ADC0: ADTRG0; AGT0: AGTO0; CAN0: CRX0; GPT_OPS0: GTOWLO; GPT2: GTIOC2B; QSPI0: QIO0; SCI0: SCK0" - なし - - 
      P103 33 - - - - Disabled - - "AGT2: AGTIO2; CAN0: CTX0; GPT_OPS0: GTOWUP; GPT2: GTIOC2A; QSPI0: QIO3; SCI0: CTSRTS0" - なし - - 
      P104 32 - - - - Disabled - - "AGT2: AGTEE2; GPT_POEG1: GTETRGB; GPT1: GTIOC1B; ICU0: IRQ01; QSPI0: QIO2" - なし - - 
      P108 25 DEBUG0_SWDIO - Low - "Peripheral mode" CMOS None "AGT3: AGTOA3; DEBUG0: SWDIO; DEBUG0: TMS; GPT_OPS0: GTOULO; GPT0: GTIOC0B; SCI9: CTSRTS9; SPI0: SSLA0" - IO - - 
      P109 26 - - - - Disabled - - "AGT3: AGTOB3; CGC0: CLKOUT; DEBUG0: TDO; DEBUG0: TRACESWO; GPT_OPS0: GTOVUP; GPT1: GTIOC1A; SCI9: SDA9; SCI9: TXD9; SPI0: MOSIA" - なし - - 
      P110 27 - - - - Disabled - - "AGT3: AGTEE3; DEBUG0: TDI; GPT_OPS0: GTOVLO; GPT1: GTIOC1B; ICU0: IRQ03; SCI2: CTSRTS2; SCI9: RXD9; SCI9: SCL9; SPI0: MISOA" - なし - - 
      P111 28 - - - - Disabled - - "AGT5: AGTOA5; GPT3: GTIOC3A; ICU0: IRQ04; SCI2: SCK2; SCI9: SCK9; SPI0: RSPCKA" - なし - - 
      P112 29 - - - - Disabled - - "AGT5: AGTOB5; GPT3: GTIOC3B; QSPI0: QSSL; SCI1: SCK1; SCI2: SDA2; SCI2: TXD2; SPI0: SSLA0; SSI0: SSIBCK0" - なし - - 
      P200 21 - - - - Disabled - - "ICU0: NMI" - なし - - 
      P201 20 - - - - Disabled - - "SYSTEM0: MD" - なし - - 
      P206 18 - - - - Disabled - - "CTSU0: TS02; GPT_OPS0: GTIU; ICU0: IRQ00; IIC1: SDA1; SCI4: RXD4; SCI4: SCL4; SCI9: CTS9; SDHI0: SD0DAT2; SPI0: SSLA1; SSI0: SSIDATA0; USB_FS0: USB_VBUSEN" - なし - - 
      P207 17 - - - - Disabled - - "CTSU0: TSCAP; QSPI0: QSSL; SCI4: SDA4; SCI4: TXD4; SPI0: SSLA2" - なし - - 
      P212 8 CGC0_EXTAL - Low None "Peripheral mode" CMOS None "AGT1: AGTEE1; CGC0: EXTAL; GPT_POEG3: GTETRGD; GPT0: GTIOC0B; ICU0: IRQ03; SCI1: RXD1; SCI1: SCL1" - IO - - 
      P213 7 CGC0_XTAL - Low None "Peripheral mode" CMOS None "AGT2: AGTEE2; CGC0: XTAL; GPT_POEG2: GTETRGC; GPT0: GTIOC0A; ICU0: IRQ02; SCI1: SDA1; SCI1: TXD1" - IO - - 
      P300 24 DEBUG0_SWCLK - Low - "Peripheral mode" CMOS None "DEBUG0: SWCLK; DEBUG0: TCK; GPT_OPS0: GTOUUP; GPT0: GTIOC0A; SPI0: SSLA1" - IO - - 
      P301 23 - - - - Disabled - - "AGT0: AGTIO0; GPT_OPS0: GTOULO; GPT4: GTIOC4B; ICU0: IRQ06; SCI2: RXD2; SCI2: SCL2; SCI9: CTSRTS9; SPI0: SSLA2" - なし - - 
      P302 22 - - - - Disabled - - "GPT_OPS0: GTOUUP; GPT4: GTIOC4A; ICU0: IRQ05; SCI2: SDA2; SCI2: TXD2; SPI0: SSLA3" - なし - - 
      P402 1 - - - - Disabled - - "AGT0: AGTIO0; AGT1: AGTIO1; AGT2: AGTIO2; AGT3: AGTIO3; CAC0: CACREF; CAN0: CRX0; ICU0: IRQ04; RTC0: RTCIC0; SCI4: CTS4; SSI_COMMON0: AUDIO_CLK" - なし - - 
      P407 12 USB_FS0_USB_VBUS - Low - "Peripheral mode" CMOS "input pull-up" "ADC0: ADTRG0; AGT0: AGTIO0; CTSU0: TS03; GPT6: GTIOC6A; IIC0: SDA0; RTC0: RTCOUT; SCI4: CTSRTS4; SPI0: SSLA3; USB_FS0: USB_VBUS" - IO - - 
      P408 11 - - - - Disabled - - "AGT2: AGTOB2; CTSU0: TS04; GPT_OPS0: GTOWLO; GPT6: GTIOC6B; ICU0: IRQ07; IIC0: SCL0; SCI3: RXD3; SCI3: SCL3; SCI4: CTS4; USB_FS0: USB_ID" - なし - - 
      P409 10 - - - - Disabled - - "AGT2: AGTOA2; CTSU0: TS05; GPT_OPS0: GTOWUP; ICU0: IRQ06; SCI3: SDA3; SCI3: TXD3; USB_FS0: USB_EXICEN" - なし - - 
      P500 37 - - - - Disabled - - "ADC0: AN016; AGT0: AGTOA0; CAC0: CACREF; GPT_OPS0: GTIU; QSPI0: QSPCLK; USB_FS0: USB_VBUSEN" - なし - - 
      RES 19 SYSTEM0_RES - - - - - - - - IO "Read only" - 
      USBDM 14 USB_FS0_USB_DM - - - - - - - - IO "Read only" - 
      USBDP 15 USB_FS0_USB_DP - - - - - - - - IO "Read only" - 
      VBATT 2 SYSTEM0_VBATT - - - - - - - - IO "Read only" - 
      VCC 9 SYSTEM0_VCC - - - - - - - - IO "Read only" - 
      VCC 30 SYSTEM0_VCC - - - - - - - - IO "Read only" - 
      VCCUSB 16 USB_FS0_VCC_USB - - - - - - - - IO "Read only" - 
      VCL0 3 SYSTEM0_VCL0 - - - - - - - - IO "Read only" - 
      VREFH 41 ANALOG0_VREFH - - - - - - - - IO "Read only" - 
      VREFH0 45 ANALOG0_VREFH0 - - - - - - - - IO "Read only" - 
      VREFL0 44 ANALOG0_VREFL0 - - - - - - - - IO "Read only" - 
      VSS 6 SYSTEM0_VSS - - - - - - - - IO "Read only" - 
      VSS 31 SYSTEM0_VSS - - - - - - - - IO "Read only" - 
      VSSUSB 13 USB_FS0_VSS_USB - - - - - - - - IO "Read only" - 
      XCIN 4 CGC0_XCIN - - - - - - - - IO "Read only" - 
      XCOUT 5 CGC0_XCOUT - - - - - - - - IO "Read only" - 
    
  User Events
    
  User Event Links
    
  Module "I/O Port (r_ioport)"
    Parameter Checking: Default (BSP)
    
  Module "USB PCDC (r_usb_pcdc)"
    Bulk In Pipe: USB PIPE4
    Bulk Out Pipe: USB PIPE5
    Interrupt In Pipe: USB PIPE6
    
  Module "USB (r_usb_basic)"
    Parameter Checking: Default (BSP)
    PLL Frequency: Not Supported
    CPU Bus Access Wait Cycles: Not Supported
    Battery Charging: Not Supported
    Power IC Shutdown Polarity: Active High
    Dedicated Charging Port (DCP) Mode: Not Supported
    Notifications for SET_INTERFACE/SET_FEATURE/CLEAR_FEATURE: Enabled
    Double Buffering: Enabled
    Continuous Transfer Mode: Not Supported
    LDO Regulator: Not Supported
    DMA Support: Disabled
    DMA Source Address: DMA Disabled
    DMA Destination Address: DMA Disabled
    USB Compliance Test mode: Disabled
    USB TPL table name: NULL
    
  Module "Flash (r_flash_hp)"
    Parameter Checking: Default (BSP)
    Code Flash Programming Enable: Enabled
    Data Flash Programming Enable: Disabled
    
  Module "Realtime Clock (r_rtc)"
    Parameter Checking: Default (BSP)
    Set Source Clock in Open: Disabled
    
  HAL
    Instance "g_ioport I/O Port (r_ioport)"
      Name: g_ioport
      1st Port ELC Trigger Source: Disabled
      2nd Port ELC Trigger Source: Disabled
      3rd Port ELC Trigger Source: Disabled
      4th Port ELC Trigger Source: Disabled
      Pin Configuration Name: g_bsp_pin_cfg
      
    Instance "g_pcdc0 USB PCDC (r_usb_pcdc)"
      Name: g_pcdc0
      
      Instance "g_basic0 USB (r_usb_basic)"
        Name: g_basic0
        USB Mode: Peri mode
        USB Speed: Full Speed
        USB Module Number: USB_IP0 Port
        USB Device Class: Peripheral Communications Device Class
        USB Descriptor: usb_descriptor
        USB Compliance Callback: NULL
        USBFS Interrupt Priority: Priority 12
        USBFS Resume Priority: Priority 12
        USBFS D0FIFO Interrupt Priority: Priority 12
        USBFS D1FIFO Interrupt Priority: Priority 12
        USBHS Interrupt Priority: Not Supported
        USBHS D0FIFO Interrupt Priority: Not Supported
        USBHS D1FIFO Interrupt Priority: Not Supported
        USB RTOS Callback: NULL
        USB Callback Context: NULL
        
    Instance "g_flash0 Flash (r_flash_hp)"
      Name: g_flash0
      Data Flash Background Operation: Disabled
      Callback: NULL
      Flash Ready Interrupt Priority: Disabled
      Flash Error Interrupt Priority: Disabled
      
    Instance "g_rtc0 Realtime Clock (r_rtc)"
      Name: g_rtc0
      Clock Source: Sub-Clock
      Frequency Comparision Value (LOCO): 0xff
      Automatic Adjustment Mode: Enabled
      Automatic Adjustment Period: 1 Minute
      Adjustment Type (Plus-Minus): Addition
      Error Adjustment Value: 0x00
      Callback: NULL
      Alarm Interrupt Priority: Disabled
      Period Interrupt Priority: Disabled
      Carry Interrupt Priority: Priority 12
      
