Reset vector remapping (startup code)in S5D5 series .

1.How can i use/change configuration setting command for s5D5 series in E2studio.?

2.what access window area, how to use AWS register?

  • 1) To move the vector table to a different location in the address map, you would need to set the VTOR register in the Cortex-M4 CPU registers (0xE000ED08) to the base address of the new location of the vector table http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/Ciheijba.html

    2) To set the AWS register, you can use the Flash HAL driver API, the description in the code is :-

    /*******************************************************************************************************************//**
    * @brief Configure an access window for the Code Flash memory using the provided start and end address. An access
    * window defines a contiguous area in Code Flash for which programming/erase is enabled. This area is
    * on block boundaries.
    * The block containing start_addr is the first block. The block containing end_addr is the last block.
    * The access window then becomes first block --> last block inclusive. Anything outside this range
    * of Code Flash is then write protected.
    * @note If the start address and end address are set to the same value, then the access window
    * is effectively removed. This accomplishes the same functionality as R_FLASH_HP_AccessWindowClear().
    *
    * Implements flash_api_t::accessWindowSet.
    *
    * @retval SSP_SUCCESS Access window successfully configured.
    * @retval SSP_ERR_INVALID_ADDRESS Invalid settings for start_addr and/or end_addr.
    * @retval SSP_ERR_IN_USE FLASH peripheral is busy with a prior operation.
    * @retval SSP_ERR_ASSERTION NULL provided for p_ctrl.
    * @retval SSP_ERR_INVALID_ARGUMENT Code Flash Programming is not enabled.
    * @retval SSP_ERR_NOT_OPEN Flash API has not yet been opened.
    **********************************************************************************************************************/
    ssp_err_t R_FLASH_HP_AccessWindowSet (flash_ctrl_t * const p_api_ctrl, uint32_t const start_addr,
    uint32_t const end_addr)

  • To add to Jeremy's response, VTOR register can be accessed SCB->VTOR. S5D5 has up to 96 interrupt sources for NVIC so vector table must be aligned on 512-byte (128-word) boundary.
  • Hi GB,

    Did Jeremy and Karol answered all your questions?

    JB
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    https://en-us.knowledgebase.renesas.com/