AM263P4-Q1: Regarding TCM's ECC check

Part Number: AM263P4-Q1

Could you please provide detailed specifications for the APIs and their call order used to detect ECC errors in the TCM (ATCM, BTCM) of the AM263Px MCU+ SDK 09.02.00? I tried creating a prototype based on the sample (sdl_ecc_r5_atcm0), but it aborted at the SDL_ECC_initMemory function.

What values ​​can be specified as arguments? What are the possible return values? What are the constraints on calling the function? Specifically, can it be used during lockstep operation? Can it be used while the memory being ECC checked is in use? Is the memory content being retained at the time of configuration?

Also, if the ESM settings and callback function settings are only configured on Core0-0, will Core0-0 be notified if an ECC error occurs during access from other cores?

  • Hi,

    Apologies for the delayed response:

    SDL_ECC_initMemory:

    int32_t SDL_ECC_initMemory(SDL_ECC_MemType memType, uint32_t memBase, uint32_t memSize, SDL_ECC_InitParams *pParams)

    Purpose: Initializes ECC for a specified memory region.

    Parameters:

    • memType: Memory type (use SDL_ECC_MEMTYPE_ATCM or SDL_ECC_MEMTYPE_BTCM for TCM)
    • memBase: Base address of memory region (must be aligned to 64-bit boundary)
    • memSize: Size of memory region in bytes (must be multiple of 8)
    • pParams: Initialization parameters structure

    Return Values:

    • SDL_PASS (0): Success
    • SDL_EFAIL (-1): Generic failure
    • SDL_EBADARGS (-2): Invalid arguments

    Constraints:

    • Cannot be called while the target memory is in use
    • Memory content is preserved during initialization
    • Must be called before memory is accessed with ECC enabled

    SDL_ECC_aggInjectError:

    int32_t SDL_ECC_aggInjectError(SDL_ECC_MemType memType, uint32_t addr, uint32_t errType)

    Purpose: Injects ECC errors for testing.

    Parameters:

    • memType: Memory type (SDL_ECC_MEMTYPE_ATCM or SDL_ECC_MEMTYPE_BTCM)
    • addr: Address where to inject error
    • errType: Error type (SDL_ECC_AGGR_1BIT or SDL_ECC_AGGR_2BIT)

    Return Values:

    • SDL_PASS: Success
    • SDL_EFAIL: Generic failure

    Proper Callback Sequence:

    1. Initialize ESM module first
    2. Register ESM notification callbacks
    3. Configure ECC memory regions with SDL_ECC_initMemory
    4. Enable ECC error notification in ESM
    5. Handle errors in callback function

    Lockstep Considerations:

    • In lockstep mode, ECC operations should be performed only on the primary core (Core0-0)
    • The secondary core (Core0-1) should not directly interact with ECC APIs
    • ECC configuration is shared between lockstep cores

    --
    Thanks & regards,
    Jagadish.

  • Hi, 

    Jagadish.

    Are the constraints imposed on SDL_ECC_initMemory also applicable to other memory type(OCSRAM)?
    Constraints:
    • Cannot be called while the target memory is in use
    • Memory content is preserved during initialization
    • Must be called before memory is accessed with ECC enabled

    The response regarding how to use the SDK
    Proper Callback Sequence:
    1. Initialize ESM module first
    2. Register ESM notification callbacks
    3. Configure ECC memory regions with SDL_ECC_initMemory
    4. Enable ECC error notification in ESM
    5. Handle errors in callback function
    and call SDL_ECC_aggInjectError function
    but, SDK V9.2 sample appears to be
    SDL_ECC_initMemory <- 3.
    SDL_ESM_init <- 2.Register ESM notification callbacks ?
    SDL_ECC_init <- 4.Enable ECC error notification in ESM ?
    and call SDL_ECC_injectError function.
    It seems that the response does not match the call sequence, and SDL_ECC_aggInjectError is also not present.
    Does the "1.Initialize ESM module first" require calling a separate function from the one used for SDL_ESM_init?

    C:\ti\mcu_plus_sdk_am263px_09_02_00_56\examples\sdl\ecc

    Regards,

    Imaoka.

  • Hi Jagadish,
    We apologize for the inconvenience, but we would appreciate it if you could provide your response by the end of today.

    Regards, Imaoka

  • Hi Imaoka,

    Apologies for the delayed response, i was stuck with other priority issues in this mean time, make sure to provide quick responses in future.

    Are the constraints imposed on SDL_ECC_initMemory also applicable to other memory type(OCSRAM)?

    Yes, the constraints for SDL_ECC_initMemory apply to all memory types including OCSRAM.

    It seems that the response does not match the call sequence, and SDL_ECC_aggInjectError is also not present.
    Does the "1.Initialize ESM module first" require calling a separate function from the one used for SDL_ESM_init?

    I would suggest you follow SDK 9.2 sequence only because that one is already tested.

    There is no separate "Initialize ESM module first" function beyond SDL_ESM_init().

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Currently, for OCSRAM, even when SDL_ECC_initMemory is called after starting to use OCSRAM, it returns SDL_PASS.
    In this case, does it mean that it only appears to work, but its operation is not guaranteed?
    What kind of condition does “target memory in use” actually refer to?
    For example:

    the memory has been read from or written to at least once before calling SDL_ECC_initMemory, or
    the memory is accessed by another core or an interrupt while SDL_ECC_initMemory is being executed?

    Also, if SDL_ECC_initMemory returns SDL_PASS, is it correct to judge that this constraint does not apply and that the memory has been initialized successfully?


    Could you please respond by May 14?

    Regards, Imaoka.

  • Hi Jagadish,

    I apologize for the inconvenience, but could you please provide a response to the inquiry I made three days ago?
    Regards, Imaoka.
  • Hi Imaoka,

    Apologies for the delayed response.

    Currently, for OCSRAM, even when SDL_ECC_initMemory is called after starting to use OCSRAM, it returns SDL_PASS.
    In this case, does it mean that it only appears to work, but its operation is not guaranteed?
    What kind of condition does “target memory in use” actually refer to?
    For example:

    the memory has been read from or written to at least once before calling SDL_ECC_initMemory, or
    the memory is accessed by another core or an interrupt while SDL_ECC_initMemory is being executed?

    The main function in SDL_ECC_initMemory is that  SDL_ECC_memoryRefresh.

    In this refreshment we will just read back the data in the memory and will do the write of same data into memory, this will ensure the generation of proper ECC to entire memory.

    Here what i mean by “target memory in use” is that, just should need to avoid concurrent access to the memory. 

    [SDL_ECC_initMemory executing] -> [Another core writes to same region]
    Result:
    - ECC bits may be inconsistent with actual data
    - Function may still return SDL_PASS
    If there are no multicore accesses to that memory, then there should not be any issues in using this API.
    --
    Thanks & regards,
    Jagadish.