Infineon TLE985 Series Firmware User Manual

Infineon TLE985 Series Firmware User Manual

Microcontroller with fastlin and power switches for automotive applications
Hide thumbs Also See for TLE985 Series:
Table of Contents

Advertisement

Quick Links

TLE985x
Microcontroller with FastLIN and Power Switches for
Automotive Applications
Firmware User Manual
Revision 1.0
2019-03-05
Automotive Power

Advertisement

Table of Contents
loading

Summary of Contents for Infineon TLE985 Series

  • Page 1 TLE985x Microcontroller with FastLIN and Power Switches for Automotive Applications Firmware User Manual Revision 1.0 2019-03-05 Automotive Power...
  • Page 2 TLE985x Firmware User Manual Revision History Microcontroller with FastLIN and Power Switches for Automotive Applications Page or Item Subjects (major changes since last revision) Revision 1.0, 2019-03-05 Initial release Firmware User Manual Revision 1.0 2019-03-05...
  • Page 3: Table Of Contents

    TLE985x Firmware User Manual Table of Contents Table of Contents ..............3 Introduction .
  • Page 4 TLE985x Firmware User Manual BSL commands - Protocol (Version 2.0) ........... . 29 4.3.1 Command 02 –...
  • Page 5 TLE985x Firmware User Manual 6.8.4 user_nvm_write_fast_end ............. . 80 6.8.5 user_adc1_offset_calibration .
  • Page 6 TLE985x Firmware User Manual 6.11.1.2 NVM_SWITCH_KEY_SELECT_t ............116 6.11.1.3 NVM_PASSWORD_SEGMENT_t .
  • Page 7: Introduction

    TLE985x Firmware User Manual Introduction Introduction This document specifies the BootROM firmware behavior for the TLE985x microcontroller family. The specification is organized into the following major sections: Table 1-1 Document Content Description Topic Description Startup procedure BootROM Startup procedure: An overview on the Startup procedure: the first steps executed by the BootROM after a reset, FastLIN BSL features Boot Strap Loader...
  • Page 8: Overview

    TLE985x Firmware User Manual Overview Overview This specification includes the description of all firmware features including the operations and tasks defined to support the general startup behavior and various boot options. Firmware Architecture The BootROM in the TLE985x consists of a firmware image located inside the device’s ROM. It consists of the startup procedure, the bootstrap loader via FastLIN, NVM user routines and NVM integrity handling routines.
  • Page 9: Program Structure

    TLE985x Firmware User Manual Overview Program Structure The different sections of the BootROM provide the following basic functionality. Startup procedure The startup procedure is the main control program in the BootROM. It is the first software-controlled operation in the BootROM that is executed after any reset. User/Debug mode It is used to support user code execution in the NVM address space.
  • Page 10: Bootrom Startup Procedure

    TLE985x Firmware User Manual BootROM Startup procedure BootROM Startup procedure This chapter describes the BootROM startup procedure in TLE985x. The startup procedure is the first software-controlled operation in the BootROM that is automatically executed after every reset. There are 2 operation modes in the BootROM : •...
  • Page 11: Boot Modes

    TLE985x Firmware User Manual BootROM Startup procedure A list of supported boot mode pin selections is given in “Boot Modes” on Page Many of the submodule initialization tasks require further configuration parameters which are stored in the NVM CS (Configuration Sector). The initialization process differs slightly between each selected boot mode.
  • Page 12: Nac Definition

    TLE985x Firmware User Manual BootROM Startup procedure The BootROM then enters a waiting loop to synchronize with a debugger connected to the Serial Wire Debug (SWD) interface. After that, the BootROM finishes the boot process and starts to execute user code under debugger control.
  • Page 13: Post User Mode Entry Recommendations

    TLE985x Firmware User Manual BootROM Startup procedure Details about this passphrase and how it influences the NAC timeout are given in “FastLIN Passphrase and Node Address for Diagnostic (NAD)” on Page 3.4.2 Post User Mode Entry Recommendations Upon USER MODE entry, it is highly recommended to perform the following checks and actions: Prior to any NVM operation, it is recommended to implement a test of the bit MRAMINITSTS in the register SCU_SYS_STRTUP_STS (SCU_SYS_STRTUP_STS.MRAMINITSTS).
  • Page 14: Flowcharts For User Bsl / Debug Modes

    TLE985x Firmware User Manual BootROM Startup procedure Flowcharts for User BSL / Debug Modes Start Note: NVM_CS is CS_NVM_RAM_MBIST Cold_ Reset OR NVM_CS bit0 = 1 RAM MBIST Warm_Reset? Clear RAM(range depends on RAM mode) Note: Boot mode selection is done via TMS and P0.0 pins : 1) 0X = USER_BSL_MODE 2) 11 = SWD_DEBUG_MODE...
  • Page 15: Reset Types

    TLE985x Firmware User Manual BootROM Startup procedure region and starts error handling. Otherwise, the BootROM executes a set of sequences before jumping to user code. BSL mode is entered in case of a cold/warm reset and returns to the main flow in case of a timeout. Init NVM user_mode_entry Apply NVM Protection...
  • Page 16: Startup Procedure Submodules

    TLE985x Firmware User Manual BootROM Startup procedure • System fail After a cold reset, all initialization steps, listed in Table 3-1 “Functional Blocks” on Page 11, are processed in accordance with the boot mode. In user/debug mode, the RAM MBIST & Init range depends on RAM mode setting.
  • Page 17: Ram Mbist And Ram Initialization

    TLE985x Firmware User Manual BootROM Startup procedure WDT1 is re-enabled when entering user mode from BSL mode. The watchdog WDT1is disabled before entering into debug mode. For all reset types, firmware startup in user mode enables WDT1 before jumping to user code, and the watchdog cannot be disabled while user code is being executed.
  • Page 18: Analog Module Trimming

    TLE985x Firmware User Manual BootROM Startup procedure only the presence of that specific key value will enable the corresponding mode switch. The keys can only be written with a dedicated BSL command. The user can choose to write either a single RAM key, a single NVM key or both keys at once with one BSL command.
  • Page 19: No Activity Counter (Nac) Configuration

    TLE985x Firmware User Manual BootROM Startup procedure Regardless of the boot mode, the system enters an endless loop in the case of invalid user code address error, RAM MBIST error or NVM CS pages checksum error. 3.8.8 No Activity Counter (NAC) Configuration A NAC timeout value is stored in a NVM CS page.
  • Page 20: Boot Strap Loader (Bsl)

    TLE985x Firmware User Manual Boot Strap Loader (BSL) Boot Strap Loader (BSL) The Boot Strap Loader (BSL) module supports handling of message-based command request and response communication over the FastLIN interface. The received command messages are parsed and executed according to the FastLIN protocol. The protocol message format is shared by theserial interface. Details about this message protocol are given in “BSL commands - Protocol (Version 2.0)”...
  • Page 21: Fastlin Passphrase And Node Address For Diagnostic (Nad)

    TLE985x Firmware User Manual Boot Strap Loader (BSL) 4.1.3 FastLIN Passphrase and Node Address for Diagnostic (NAD) The BootROM locks the BSL FastLIN communication after reset to avoid unexpected BSL communication on the customer side. The host needs to unlock the communication by sending a passphrase sequence to the BootROM.
  • Page 22: Bsl Message Parsing & Responses

    TLE985x Firmware User Manual Boot Strap Loader (BSL) Table 4-1 NAD Address Range NAD Value Description to FE Valid slave address range for individual slave addressing Broadcast address for concurrent slave addressing Default address if NAD value is not programmed 4.1.4 BSL Message Parsing &...
  • Page 23 TLE985x Firmware User Manual Boot Strap Loader (BSL) The state machine aborts the multimessage collection if the overall data bytes of all collected messages have exceeded the maximum message data buffer length of 137 bytes (7 bytes in the header block message + 130 EOT data bytes).
  • Page 24: Command Execution

    TLE985x Firmware User Manual Boot Strap Loader (BSL) Some BSL messages request read-out of data from the device. These messages expect EOT block. Other BSL messages download data or initiate code execution. They do not request reading out of any data. These messages only reply with a status response message.
  • Page 25: Bsl Interframe Timeout Behavior

    TLE985x Firmware User Manual Boot Strap Loader (BSL) - Read the full page into the HW assembly buffer - Update the HW buffer with new data - Program the page from the HW assembly buffer - Erase the old page Total time: 8 ms The processing time must always be taken into account.
  • Page 26: Bsl Via Fastlin

    TLE985x Firmware User Manual BSL via FastLIN 4.2.1 FastLIN Protocol FastLIN is a LIN enhancement supporting higher baudrate of up to 230.4 kBd. FastLIN is especially useful during back-end programming, where fast programming cycles are desirable. The FastLIN BSL supports baudrate of 38.4 kBd, 115.2 kBd and 230.4 kBd via the internal LIN Tranceiver HW module.
  • Page 27: Fastlin

    TLE985x Firmware User Manual SFRs LIN Tranceiver GND_LIN BSL_FAST_LIN_MODE_LAY ERS Figure 4-6 FastLIN BSL Software Hardware Layers 4.2.2 FastLIN After successful synchronization with the host, the FastLIN communication with the host starts. This section describes the command frame format that is used for the host communication. The communication between the host and the FastLIN data link layer is performed by a simple transfer protocol.
  • Page 28: Response Frame Format

    TLE985x Firmware User Manual 4.2.2.2 Response Frame Format This section describes response frames that the BootROM sends in reply to a command request. It contains a BSL EOT block or response block and an additional checksum byte. This frame format encapsulates the BSL response messages, which are described in Section 4.3.
  • Page 29: Bsl Commands - Protocol (Version 2.0)

    TLE985x Firmware User Manual BSL commands - Protocol (Version 2.0) This section describes the boot strap loader messages that are used by the FastLINprotocol. The physical layer encapsulation of these messages is described in “BSL via FastLIN” on Page All commands support acknowledge response message, which contain an error code with the result of the executed command.
  • Page 30 TLE985x Firmware User Manual Dummy Bytes Depending on the BSL frame data fill level, some frame data bytes are not used. Those bytes are filled with dummy bytes, which are set to zero. The BootROM ignores dummy bytes, independent of their values. Padding Bytes If the customer adds padding bytes, although this is not regular it is still supported by the firmware.
  • Page 31: Command 02 – Ram: Write Data/Program

    TLE985x Firmware User Manual Table 4-3 NVM Protection Check for BSL Commands NVM prot. group BSL Command Group name Group 1 Command 89 – NVM: Protection Password Set Protection Ignored Command 98 – NVM: Reflash Prepare Command 83 – RAM: Execute Command 84 –...
  • Page 32: Command 02

    TLE985x Firmware User Manual 4.3.1 Command 02 – RAM: Write Data/Program Firmware supports downloading of data and code to the device’s internal RAM via command 02 The host initiates the RAM download by sending a header block message. This message contains information about the RAM location (offset address based on RAM start address).
  • Page 33 TLE985x Firmware User Manual EOT Block 2...129 Message Length Data Type BSL20_MODE_EOT Table 4-5 “Command 02 – RAM: Write Data/Program” EOT Block Field Description Field Description Length Number of bytes to follow (Message Type- and Data field) Message Type EOT block. Always set to 80 Data Data to be written, minimum size 1 byte, maximum size 128 bytes Returned error codes...
  • Page 34: Ram: Execute

    TLE985x Firmware User Manual 4.3.2 Command 83 – RAM: Execute Firmware triggers execution of a RAM user program by the Host via command 83 . This code can be previously downloaded by the BSL Command 02 – RAM: Write Data/Program. The host initiates the RAM code execution by sending the header block message.
  • Page 35: Ram: Read Data

    TLE985x Firmware User Manual 4.3.3 Command 84 – RAM: Read Data Firmware supports reading of data from the device’s internal RAM via command 84 The host initiates the RAM read by sending a header block message. This message contains information about the RAM location (offset address based on RAM start address) and the number of bytes read.
  • Page 36 TLE985x Firmware User Manual Table 4-8 “Command 84 – RAM: Read” Data EOT Block Field Description Field Description Length Number of bytes to follow (Message Type- and Data field) Message Type EOT block. Always set to 80 Data Data to be written, minimum size 1 byte, maximum size 128 bytes Returned error codes The message can return the following error codes: - ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID...
  • Page 37: Nvm: Write Data/Program

    TLE985x Firmware User Manual 4.3.4 Command 05 – NVM: Write Data/Program Firmware supports programming of data and code to the device’s internal NVM via command 05 The host initiates NVM programming by sending a header block message. This message contains information about the NVM location (offset address based on NVM start address).
  • Page 38 TLE985x Firmware User Manual Table 4-10 “Command 05 – NVM: Write Data/Program” EOT Block Field Description Field Description Length Number of bytes to follow (Message Type- and Data field) Message Type EOT block. Always set to 80 Data Data to be written, minimum size 1 byte, maximum size 128 bytes Returned error codes The message can return the following error codes: - ERR_LOG_CODE_NVM_IS_READ_PROTECTED...
  • Page 39: Nvm: Execute

    TLE985x Firmware User Manual 4.3.5 Command 86 – NVM: Execute Firmware triggers execution of a NVM user program by the Host via command 86 . This code could be previously downloaded by the BSL Command 05 – NVM: Write Data/Program. The host initiates the NVM code execution by sending the header block message.
  • Page 40: Nvm: Read Data

    TLE985x Firmware User Manual 4.3.6 Command 87 – NVM: Read Data Firmware supports reading of data and code from the device’s internal NVM via command 87 The host initiates the NVM read by sending a header block message. This message contains information about the NVM location (offset address based on NVM start address) and the number of data bytes to read.
  • Page 41 TLE985x Firmware User Manual Table 4-13 “Command 87 – NVM: Read Data” EOT Block Field Description Field Description Length Number of bytes to follow (Message Type- and Data field) Message Type EOT block. Always set to 80 Data Data to be read, minimum size 1 byte, maximum size 128 bytes Returned error codes The message can return the following error codes: - ERR_LOG_CODE_NVM_SEGMENT_READ_PROTECTED...
  • Page 42: Nvm: Erase

    TLE985x Firmware User Manual 4.3.7 Command 88 – NVM: Erase Firmware supports the erasure of NVM pages, NVM sectors and the overall NVM (mass erase) via command 88 The host initiates the NVM erase operation by sending a header block message. This message contains information about the NVM location (an offset address based on the NVM start address) and selects the erase granularity.
  • Page 43 TLE985x Firmware User Manual - ERR_LOG_CODE_ACCESS_AB_MODE_ERROR - ERR_LOG_CODE_BSL_RECV_BYTES_MISMATCH - ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED - ERR_LOG_CODE_NVM_ERASE_PARAMS_INVALID - ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID - ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID - ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY The remaining error codes returned are the same as for the corresponding user API calls, see: “user_nvm_page_erase” on Page 97 “user_nvm_sector_erase” on Page 99 Firmware User Manual Revision 1.0 2019-03-05...
  • Page 44: Nvm: Protection Password Set

    TLE985x Firmware User Manual 4.3.8 Command 89 – NVM: Protection Password Set The command supports setting individual NVM region protection password. The protection becomes active at the following reset. The regions protected are the customer bootloader NVM region, code region, data linear region and data mapped region.
  • Page 45 TLE985x Firmware User Manual Returned error codes .“user_nvm_password_set” on Page 96 Firmware User Manual Revision 1.0 2019-03-05...
  • Page 46: Command 8A

    TLE985x Firmware User Manual 4.3.9 Command 8A – NVM: Switch Keys Set This command allows to change the RAM test mode (see “RAM MBIST and RAM Initialization” on Page or NVM data mode (see “RAM Mode Key and NVM Data Mode Key” on Page 17) or both by programming switching keys into the NVM configuration sector.
  • Page 47 TLE985x Firmware User Manual Table 4-18 “Command 89 – NVM: Switch Keys Set” Header Block Key Options Field Description Field Bits Description Reserved Reserved Switch key select Switch key selector Select which of the keys to write to location SWITCH_KEY_1, is selected location SWITCH_KEY_2, is selected location SWITCH_KEY_3, is selected Reserved, for future use...
  • Page 48: Nvm: Page Checksum Check

    TLE985x Firmware User Manual 4.3.10 Command 8B – NVM: Page Checksum Check This command reads a complete NVM page, calculates the overall checksum and compare it with the stored checksum for that page. Command returns success if checksum matches. Pages supported are all NVM 100TP pages and BSL startup page.
  • Page 49: Command 0C

    TLE985x Firmware User Manual 4.3.11 Command 0C – NVM: NVM Checksum Calculation This command calculates a target NVM range checksum using a 16 bit XOR algorithm and compares the result with a reference checksum provided as a command parameter. The command returns with a pass indication when the calculated checksum matches the provided reference checksum, otherwise it returns with a fail indication.
  • Page 50 TLE985x Firmware User Manual Table 4-21 “Command 0C – NVM: NVM Checksum Calculation” EOT Block Field Description (cont’d) Field Description Number of Pages 16-bit number indicating the number of pages to be checked. The number must not (MSB) exceed the number of NVM pages available in linear regions. Note: In data mapped mode, NVM page availability ends at the end of the code region Number of Pages Note: The actual number to be entered has to be decremented by 1...
  • Page 51: Command 0D

    TLE985x Firmware User Manual 4.3.12 Command 0D – NVM: 100TP Write Firmware supports programming of data in the customer-specific 100TP pages via command 0D The header block message contains parameter about the 100TP page index, the offset inside that page. The data bytes are sent within the EOT block message.
  • Page 52 TLE985x Firmware User Manual EOT Block 2...127 Message Length Data Type BSL20 _BSL _NVM_100TP_WRITE_EOT Table 4-23 “Command 0D – NVM: 100TP Write” EOT Block Field Description Field Description Length Number of bytes to follow (Message Type- and Data field) Message Type EOT block.
  • Page 53: Command 8E

    TLE985x Firmware User Manual 4.3.13 Command 8E – NVM: 100TP Read Firmware supports reading of data from the customer-specific 100TP page via command 8E The header block message contains parameter about the 100TP page index, the offset inside that page and the number of data bytes to read.
  • Page 54 TLE985x Firmware User Manual Returned error codes “user_nvm_100tp_read” on Page 89 Firmware User Manual Revision 1.0 2019-03-05...
  • Page 55: Command 8F

    TLE985x Firmware User Manual 4.3.14 Command 8F – BSL: NAC Set The Firmware supports NAC data setting with the command 8F - BSL: NAC Set. The header block message contains the NAC value, it gets stored in the device NVM CS and is used at the next startup.
  • Page 56: Bsl: Nac Get

    TLE985x Firmware User Manual 4.3.15 Command 90 – BSL: NAC Get Firmware supports reading the current configured BSL option data from the NVM CS, currently only the BSL timeout (NAC) value, via command 90 The header block message contains the information request. The BootROM sends the information by an EOT block message.
  • Page 57: Fastlin: Nad Set

    TLE985x Firmware User Manual 4.3.16 Command 91 – FastLIN: NAD Set Firmware supports setting of the FastLIN NAD via command 91 The header block message contains as a parameter the FastLIN NAD value. The given NAD address is stored in the device NVM CS and is used for the next startup.
  • Page 58: Fastlin: Nad Get

    TLE985x Firmware User Manual 4.3.17 Command 92 – FastLIN: NAD Get Firmware supports reading the currently configured FastLIN NAD value via command 92 The header block message contains the information request. The BootROM sends the current FastLIN NAD value within the EOT block message. The given NAD address is read from the NVM CS. For potential command execution constraints see “NVM Protection Check for BSL Commands”...
  • Page 59: Fastlin: Set Session Baudrate

    TLE985x Firmware User Manual 4.3.18 Command 93 – FastLIN: Set Session Baudrate Firmware supports changing the FastLIN baudrate for the current FastLIN BSL session via command 93 The header block message contains the new FastLIN baud rate selection, which will be in effect with the next BSL command.
  • Page 60: Nvm 100Tp Erase

    TLE985x Firmware User Manual 4.3.19 Command 97 – NVM 100TP Erase NVM 100TP Erase function provides a corrective action in case an ECC2 error is found in 100TP page. The difference to a regular NVM page erase is that the 100TP page counter is preserved. If the page contains an ECC2 error, the write counter is reconfigured to allow a maximum of 5 more operations.
  • Page 61: Nvm: Reflash Prepare

    TLE985x Firmware User Manual 4.3.20 Command 98 – NVM: Reflash Prepare The command prepares device for the subsequent reflash steps. If the given password matches the installed password of the given region, it triggers erasure for all user NVM regions and region passwords. The command is the only way to remove an already set read protection on any NVM region.
  • Page 62 TLE985x Firmware User Manual - ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED - ERR_LOG_CODE_ACCESS_AB_MODE_ERROR - ERR_LOG_CODE_NVM_ECC2_DATA_ERROR - ERR_LOG_CODE_ECC2READ_ERROR - ERR_LOG_CODE_NVM_VER_ERROR - ERR_LOG_CODE_USER_PROTECT_PWD_EXISTS - ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH Firmware User Manual Revision 1.0 2019-03-05...
  • Page 63: Nvm: Set Cbsl Size

    TLE985x Firmware User Manual 4.3.21 Command 99 – NVM: Set CBSL Size With the BSL command “NVM: Set CBSL Size” it is possible to configure the CBSL region size from 0 to 16 kbyte. Setting the CBSL size to 0 supports the option to have a unique code region in case a CBSL region is not needed.
  • Page 64 TLE985x Firmware User Manual - ERR_LOG_CODE_NVM_VER_ERROR - ERR_LOG_CODE_BSL_RECV_BYTES_MISMATCH - ERR_LOG_CODE_MSG_VALIDITY_FAIL Firmware User Manual Revision 1.0 2019-03-05...
  • Page 65: End Of Transmission Message (80 H )

    TLE985x Firmware User Manual 4.3.22 End of Transmission Message (80 Firmware supports sending an end of transmission (EOT) message (80 ), which is used to send back data requested by a BSL command. The data field in the message can range from 1 to 128 bytes EOT Block 2...129 Message...
  • Page 66: Acknowledge Response Message

    TLE985x Firmware User Manual 4.3.23 Acknowledge Response Message (81 The firmware supports sending back an acknowledge response message (81 ) if the requested BSL command does not retrieve any data or the requested data cannot be provided. It is also sent if a problem occurred during processing the requested command data.
  • Page 67: Nvm

    TLE985x Firmware User Manual NVM Overview The NVM module consists of three regions, the Config Sector, the user code region and the user data region. 5.1.1 Config Sector Region The Config Sector holds device specific information as well the eight 100TP pages. The Config Sector is not directly addressable by the user.
  • Page 68: Nvm Password Protection

    TLE985x Firmware User Manual 5.1.4 NVM Password Protection Firmware supports setting and clearing of NVM protection for different NVM regions. These regions are the customer Bootloader NVM sectors, code and data NVM sectors. NVM region protection includes access protection for read and/or write/erase. NVM protection passwords are 32-bit in lenght, the two MSBs are reserved for read/write protection handling.
  • Page 69: Nvm Fast Write

    TLE985x Firmware User Manual NVM Data Mapped Region For writing a new data flash page, the user API function checks the content of the MapRAM for the given address. Since the page is not used, the MapRAM entry is marked unused. An internally maintained spare page points to a randomly selected erased physical data flash page.
  • Page 70 TLE985x Firmware User Manual MapRAM an error occurred, i.e. a MapBlock of a data flash page contains ECC failures or if two pages are pointing to the same MapRAM entry (double mapping) then a repair function is called, the Service Algorithm (SA).
  • Page 71: User Routines

    TLE985x Firmware User Manual User Routines User Routines The BootROM exports some library functions to the user mode software. These library functions allow to configure the device boot parameter and access the NVM. List of Supported Features • Read and write the various 100TP pages inside the NVM. •...
  • Page 72: Interrupts

    TLE985x Firmware User Manual User Routines • Reconfigure watchdog for normal operation Doing this ensures that watchdog will not expire and cause reset in the middle of a longer NVM operation. Interrupts System interrupts are not used by any BootROM functions during startup or when any user APIs are executed. Interrupts are disabled by default.
  • Page 73 TLE985x Firmware User Manual User Routines Table 6-1 Resources used by User API functions User API function Non Re-entrance NVM HW GPT12 timer user_nvm_write / X (write) user_nvm_write_branch / user_nvm_write_fast / user_nvm_write_fast_retry / user_nvm_write_fast_abort / user_ram_mbist user_nvm_clk_factor_set user_vbg_temperature_get X (read) user_dflash_mode Firmware User Manual Revision 1.0...
  • Page 74: User Api Routines

    TLE985x Firmware User Manual User API Routines These routines are exported by the BootROM to the customer user mode software. User API Routines support features like accessing memory resources like NVM and 100TP pages. They also support to configure some protection mechanism and BSL parameters. The API functions check the valid parameter range, which is depending on the device.
  • Page 75 TLE985x Firmware User Manual Table 6-2 User API Routines Function Overview (cont’d) Name Description user_nvm_100tp_write This user API function writes data to the configuration NVM, the write address is relative inside the configuration NVM area (8x one page, 1024 bytes). The function supports partial page programming, preserving the page data not passed as an input.
  • Page 76 TLE985x Firmware User Manual Table 6-2 User API Routines Function Overview (cont’d) Name Description user_nvm_page_erase This user API function erases a given NVM page (address). In case of an unsused (new) page in non-linear sector, the function does nothing and returns success. In case of erasing a page in linear sector, the function should always perform the erase.
  • Page 77: User_Nvm_Write_Fast_Start

    TLE985x Firmware User Manual Table 6-2 User API Routines Function Overview (cont’d) Name Description user_nvm_write This user API function programs the NVM. It operates on the user NVM, as well as on the user data NVM. The API shall write a number of bytes (count) from the source (data) to the NVM location (address) with the programming options (options).
  • Page 78 TLE985x Firmware User Manual operates on the NVM code region, as well as on the NVM data region. The API shall write a number of bytes (count) from the source (data) to the NVM location (address). It supports partial non-page-aligned programming, preserving the page data not passed as an input.
  • Page 79: User_Nvm_Write_Fast_Continue

    TLE985x Firmware User Manual Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a reentrant context. 6.8.2 user_nvm_write_fast_continue Description This user API function executes the second step of fast write sequence. It can only be called after successful sequence start by prior call to user_nvm_write_fast_start, otherwise the operation is rejected returning error ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE.
  • Page 80: User_Nvm_Write_Fast_End

    TLE985x Firmware User Manual Calls to this function should be placed after the scheduled calls to nvm_write_fast_continue() have been completed in order to determine current data quality. To finish the entire process the user must then call user_nvm_write_fast_end. Prototype int32_t user_nvm_write_fast_verify (void) Parameters void Return Values...
  • Page 81: User_Adc1_Offset_Calibration

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS if the fast write end was OK, otherwise a negative value. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_NVM_WRITE_FAST_SEMAPHORE_RESERVED, ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE, ERR_LOG_CODE_NVM_MAPRAM_MANUAL_SPARE_PAGE_FAILED 6.8.5 user_adc1_offset_calibration Description This user API function will perform ADC1 core calibration in software mode. It updates ADC1_OFFSETCALIB register if the calibration algorithm is executed successfully.
  • Page 82: User_Nvm_Service_Algorithm

    TLE985x Firmware User Manual Parameters Data Type Name Description uint32_t page_no Page to check, which is one of the 100TP pages (0..7) or NVM CS page containing BSL (startup) settings (8). Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the function has been called successfully, otherwise a negative error code.
  • Page 83: User_Nvm_Mapram_Recover

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the function has been called successfully, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context.
  • Page 84: User_Nvm_Mapram_Init

    TLE985x Firmware User Manual 6.8.9 user_nvm_mapram_init Description This user API function triggers NVM FSM mapRAM update sequence from mapped sector. Prototype int32_t user_nvm_mapram_init (void) Parameters void Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the function has been called successfully, otherwise a negative error code.
  • Page 85: User_Nvm_Ecc_Check

    TLE985x Firmware User Manual Parameters Data Type Name Description uint32_t * pNVM_Addr Pointer where to store the ECC2 failing NVM address. This pointer stays untouched in case no NVM ECC2 errors was detected. The address format is: NVM area: 0001000100000XXXXXXXXXXXXXXXX000b, where X is the NVM offset NVM 100TP area: 0x100000XY, where X = 100TP page number, Y = block offset inside the page Internal NVM CS area: 0x01000000...
  • Page 86: User_Nac_Get

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case no single or double ECC event have occurred, otherwise a negative error code for single, double or single and double ECC errors. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_SINGLE_ECC_EVENT_OCCURRED, ERR_LOG_CODE_DOUBLE_ECC_EVENT_OCCURRED,...
  • Page 87: User_Nac_Set

    TLE985x Firmware User Manual 6.8.13 user_nac_set Description This user API function configures the NAC value in the non volatile device configuration memory. This function rejects with an error in case the NVM code segment is write protected or NAC value is out of valid range [0, 2-28, 255].
  • Page 88: User_Nad_Set

    TLE985x Firmware User Manual Parameters Data Type Name Description uint8_t * nad_value Pointer where to store the BSL nad value read from the device configuration sector. Pointer must be located in RAM. Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the function has been called successfully, otherwise a negative error code.
  • Page 89: User_Nvm_100Tp_Read

    TLE985x Firmware User Manual Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context. 6.8.16 user_nvm_100tp_read Description This user API function reads data from the customer accessible configuration pages (100TP). The read address is relative inside the configuration NVM area (8x one page, 1024 bytes).
  • Page 90: User_Nvm_100Tp_Write

    TLE985x Firmware User Manual Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context. 6.8.17 user_nvm_100tp_write Description This user API function writes data to the configuration NVM, the write address is relative inside the configuration NVM area (8x one page, 1024 bytes).
  • Page 91: User_Nvm_100Tp_Erase

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful write operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID, ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED, ERR_LOG_CODE_100TP_PAGE_INVALID, ERR_LOG_CODE_100TP_WRITE_COUNT_EXCEEDED, ERR_LOG_CODE_NVM_VER_ERROR, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR, ERR_LOG_CODE_NVM_ECC2_DATA_ERROR, ERR_LOG_CODE_ECC2READ_ERROR Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context.
  • Page 92: User_Nvm_Config_Get

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful write operation, otherwise a negative error code. Exception is ERR_LOG_CODE_NVM_100TP_PAGE_CNT_ERROR, which means page is erased OK but ECC2 error was detected while reading write counter. Write counter is set so it allows 5 more writes to the page.
  • Page 93: User_Nvm_Protect_Get

    TLE985x Firmware User Manual Data Type Name Description uint32_t * code_nvm_size Pointer where to store the retrieved NVM code size. Valid RAM range is 0x18000000 + device RAM size. uint32_t * data_nvm_size Pointer where to store the retrieved NVM data size. Valid RAM range is 0x18000000 + device RAM size.
  • Page 94: User_Nvm_Protect_Set

    TLE985x Firmware User Manual 6.8.21 user_nvm_protect_set Description This user API function sets write protection for any NVM region individually, except CBSL. The API changes the protection state for a region, but does not update the installed password in configuration sector. It is not possible to change read protection for the segments.
  • Page 95: User_Nvm_Protect_Clear

    TLE985x Firmware User Manual 6.8.22 user_nvm_protect_clear Description This user API function clears write protection for any NVM region individually, except CBSL. Read protection changes is ignored. The API changes the protection state for a region, but does not update the installed password in config sector.
  • Page 96: User_Nvm_Password_Set

    TLE985x Firmware User Manual 6.8.23 user_nvm_password_set Description This user API function sets password for NVM region individually. The API does not change the protection state for a region where password protection is currently installed. The password parameter consists of a 30-bit password (bit 0...29) and two additional protection bits (bit 30 + bit 31).
  • Page 97: User_Nvm_Ready_Poll

    TLE985x Firmware User Manual Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context. 6.8.24 user_nvm_ready_poll Description This user API function checks for the readiness of the NVM module. The API is called within the NVM programming or erase branch callback operation.
  • Page 98: User_Nvm_Page_Erase_Branch

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful erase operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR Remarks This function does not support erasing any 100TP pages. It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context.
  • Page 99: User_Nvm_Sector_Erase

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful erase operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID, ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR Remarks This function does not support to erase any 100TP pages. It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context.
  • Page 100: User_Nvm_Write

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful erase operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR ERR_LOG_CODE_ACCESS_AB_MODE_ERROR Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context.
  • Page 101: User_Nvm_Write_Branch

    TLE985x Firmware User Manual Parameters Data Type Name Description uint32_t address NVM address where to program the data. Range is 0x11000000 + device NVM size. const void * data Pointer to the data where to read the programming data. Pointer must be within valid RAM range (0x18000000 + device RAM size) or an error code is returned.
  • Page 102 TLE985x Firmware User Manual Supported option parameters: • NVM_PROG_CORR_ACT (for linear sector: it enables retry. for mapped sector: it enables retry and disturb handling) • NVM_PROG_NO_FAILPAGE_ERASE (only support mapped sector: when program new page verify fails, without the option, the newly programmed data is erased; with the option, the faulty page will remain. When program used page verify fails, without the option, the newly programmed data will be erased, the old page remains;...
  • Page 103: User_Ram_Mbist

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful write operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_PARAM_INVALID, ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID, ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY, ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID, ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR, ERR_LOG_CODE_NVM_MAPRAM_UNKNOWN_TYPE_USAGE, ERR_LOG_CODE_NVM_ECC2_MAPBLOCK_ERROR, ERR_LOG_CODE_NVM_ECC2_DATA_ERROR,...
  • Page 104: User_Nvm_Clk_Factor_Set

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful MBIST execution, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_MBIST_RAM_RANGE_INVALID, ERR_LOG_CODE_MBIST_FAILED, ERR_LOG_CODE_MBIST_TIMEOUT Remarks Customer needs to pay attention: the BootROM stack pointer must not get destroyed. 6.8.31 user_nvm_clk_factor_set Description...
  • Page 105: User_Nvm_Page_Verify

    TLE985x Firmware User Manual Parameters Data Type Name Description VBG_TEMP_SELECT_t temp_select Selects the temperature to read uint32_t * temperature Pointer where to store the temperature value read from the device configuration sector. Pointer must be located in RAM. Return Values Data Type Description int32_t...
  • Page 106: User_Nvm_Page_Erase_Verify

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful verify operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID, ERR_LOG_CODE_NVM_VER_ERROR, ERR_LOG_CODE_NVM_PAGE_NOT_MAPPED, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR, ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR, ERR_LOG_CODE_NVM_ECC2_DATA_ERROR, ERR_LOG_CODE_NVM_ECC2_MAPBLOCK_ERROR Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re-...
  • Page 107: User_Nvm_Sector_Erase_Verify

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful verify operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID, ERR_LOG_CODE_NVM_PAGE_IS_MAPPED, ERR_LOG_CODE_NVM_SPARE_PAGE_IS_NOT_MAPPED, ERR_LOG_CODE_NVM_VER_ERROR, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR, ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context.
  • Page 108: User_Dflash_Mode

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case of successful verify operation, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID, ERR_LOG_CODE_NVM_PAGE_IS_MAPPED, ERR_LOG_CODE_NVM_VER_ERROR, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR, ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR Remarks It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re- entrant context.
  • Page 109: Misc_Handle_Nvm_Segment_Data_Mode_Check

    TLE985x Firmware User Manual Table 6-3 User API support routines Function Overview Name Description get_nac_from_nvm_cs This user API support function gets the BSL NAC value from NVM handle_segment_protection_get This user API support function checks the protection for an address to NVM. Address must point into valid NVM area as address it not checked beforehand..
  • Page 110: Misc_Nvm_Reflash_Prepare

    TLE985x Firmware User Manual NVM_PASSWORD_SEGMENT_t segment Parameters Data Type Name Description NVM_PASSWORD_SEG segment Segment to check the NVM configuration against MENT_t Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the password could be successfully applied, otherwise a negative error code. 6.9.2 misc_nvm_reflash_prepare Description...
  • Page 111: Misc_User_Nvm_Password_Set

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the password could be successfully applied, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID ERR_LOG_CODE_NO_PASSWORD_EXISTS, ERR_LOG_CODE_USER_PROTECT_WRONG_PASSWORD, ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR ERR_LOG_CODE_ACCESS_AB_MODE_ERROR, ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH 6.9.3 misc_user_nvm_password_set Description...
  • Page 112: Misc_User_Nvm_Switch_Key_Set

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the password could be successfully applied, otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID, ERR_LOG_CODE_USER_PROTECT_PWD_INVALID, ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED, ERR_LOG_CODE_ACCESS_AB_MODE_ERROR, ERR_LOG_CODE_NVM_ECC2_DATA_ERROR, ERR_LOG_CODE_NVM_VER_ERROR, ERR_LOG_CODE_USER_PROTECT_PWD_EXISTS, ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH Remarks...
  • Page 113: Handle_Segment_Protection_Get

    TLE985x Firmware User Manual Return Values Data Type Description int32_t ERR_LOG_SUCCESS in case the function has been called successfully and written the key value to the selected key. Otherwise a negative error code. Returned status code can be one of the following: ERR_LOG_SUCCESS, ERR_LOG_CODE_USERAPI_CONFIG_SECTOR_WRITE_PROTECTED, ERR_LOG_CODE_SWITCH_KEY_INVALID, ERR_LOG_CODE_USERAPI_SWITCH_KEY_VALUE_OR_USAGE_INVALID,...
  • Page 114: Get_Nac_From_Nvm_Cs

    TLE985x Firmware User Manual Prototype int32_t valid_pointer_ram_range_check ( uint32_t ptr_address uint32_t length Parameters Data Type Name Description uint32_t ptr_address Start address of RAM range to check. uint32_t length Function Length of the RAM range to check Return Values Data Type Description int32_t Negative error if range is not valid or length is zero, otherwise ERR_LOG_SUCCESS...
  • Page 115: Nvm Protection Api Types

    TLE985x Firmware User Manual Prototype int32_t misc_user_read_nvm_password_ecc ( NVM_PASSWORD_SEGMENT_t segment uint32_t * read_nvm_password Parameters Data Type Name Description NVM_PASSWORD_SEG segment The segment from where the password should be read MENT_t uint32_t * read_nvm_pass Pointer to a location where to store the read password word Return Values Data Type...
  • Page 116: Nvm_Switch_Id_Select_T

    TLE985x Firmware User Manual Table 6-4 Enumerator Overview (cont’d) Name Description VBG_TEMP_SELECT_t VBG Temperature selection. NVM_DFLASH_SECTOR_MODE_t User API NVM data region mode 6.11.1.1 NVM_SWITCH_ID_SELECT_t Description NVM switch ID selection Prototype typedef enum STARTUP_RAM_MBIST_RANGE_ID, NVM_DATA_LINEAR_ID, NVM_DATA_LINEAR_AND_RAM_MBIST_RANGE_ID, }NVM_SWITCH_ID_SELECT_t; Parameters Name Value Description STARTUP_RAM_MBIST_RANGE_ID RAM MBIST reduced range ID selected NVM_DATA_LINEAR_ID...
  • Page 117: Nvm_Password_Segment_T

    TLE985x Firmware User Manual Parameters Name Value Description SWITCH_KEY_1 Switch key 1 selected SWITCH_KEY_2 Switch key 2 selected SWITCH_KEY_3 Switch key 3 selected 6.11.1.3 NVM_PASSWORD_SEGMENT_t Description NVM protection API password segment Prototype typedef enum NVM_PASSWORD_SEGMENT_BOOT, NVM_PASSWORD_SEGMENT_CODE, NVM_PASSWORD_SEGMENT_DATA, NVM_PASSWORD_SEGMENT_DATA_LINEAR, NVM_PASSWORD_SEGMENT_LAST, }NVM_PASSWORD_SEGMENT_t; Parameters Name Value...
  • Page 118: Nvm_Dflash_Sector_Mode_T

    TLE985x Firmware User Manual VBG_TEMP_COLD, }VBG_TEMP_SELECT_t; Parameters Name Value Description VBG_TEMP_HOT VBG Temperature selection Hot VBG_TEMP_COLD VBG Temperature selection Cold 6.11.1.5 NVM_DFLASH_SECTOR_MODE_t Description User API NVM data region mode Prototype typedef enum NVM_MAPPED_DATA_SECTOR_MODE, NVM_LINEAR_DATA_SECTOR_MODE, NVM_BAD_DATA_SECTOR_MODE, }NVM_DFLASH_SECTOR_MODE_t; Parameters Name Value Description NVM_MAPPED_DATA_SECTOR_MODE NVM is in mapped data sector mode.
  • Page 119 TLE985x Firmware User Manual Table 6-5 Constant Overview (cont’d) Name Value Description NVM_PROG_CORR_ACT 0x02u Disturb handling and retry enabled (data mapped mode only) NVM_PROG_NO_FAILPAGE_ERASE 0x04u Erasing of programmed data on fail enabled (data linear mode only) Firmware User Manual Revision 1.0 2019-03-05...
  • Page 120: Terminology

    TLE985x Firmware User Manual Terminology 100-Time The BootROM offers eight 100-time programmable pages to the user mode software. The Programming size of a 100TP page is 128 bytes. The last two bytes of each 100TP page store the (100TP) programming counter, followed by the page checksum byte. Assembly Buffer Application Programming Interface BootROM...
  • Page 121 TLE985x Firmware User Manual Header block Part of the BSL command message. The host initiates a command by sending the header block. Some commands require further data transmission, during which the header block is followed by one or multiple data blocks and a terminating EOT block. Host The host communicates with the BootROM device over the LIN interface.
  • Page 122 TLE985x Firmware User Manual Special Function Register (CPU memory-mapped device hardware registers) Serial Wire Debug Tearing Safe The mapping mechanism of the NVM module is intended to be used like a log-structured Programming file system: When a page is programmed in the cell array, the old values are not physically overwritten, but a different physical page (the spare page) in the same sector is programmed in fact.
  • Page 123: Appendix A Error Codes

    TLE985x Firmware User Manual Appendix A Error Codes This chapter provides a table that lists all available error codes. Table A-1 List of Possible Errors during Startup Error Name Error Code Errors Description ERR_LOG_ERROR Standard Error ERR_LOG_CODE_WRONG_BSL_MEDIA Mismatch in configured BSL protocol media type and _TYPE received media type in media driver ERR_LOG_CODE_NVM_SEGMENT_REA...
  • Page 124 TLE985x Firmware User Manual Table A-1 List of Possible Errors during Startup (cont’d) Error Name Error Code Errors Description ERR_LOG_CODE_TEST_HTOL_FBI_MD Factory test HTOL functional burn-in MDU test failed U_FAIL ERR_LOG_CODE_TEST_HTOL_FBI_RA Factory test HTOL functional burn-in XRAM M_FAIL verification failed ERR_LOG_CODE_FTEST_BOOTROM_SI Factory test BootROM signature read error GNATURE_READ ERR_LOG_CODE_TEST_HTOL_PWR_L...
  • Page 125 TLE985x Firmware User Manual Table A-1 List of Possible Errors during Startup (cont’d) Error Name Error Code Errors Description ERR_LOG_CODE_NVM_PAGE_NOT_MA NVM page is not mapped PPED ERR_LOG_CODE_NVM_INIT_MAPRAM_ Mapped page has double mapping or ECC2 error SECTOR when trying to init mapRAM ERR_LOG_CODE_NVM_MAPRAM_MAN NVM manual spare page selection failed as part of UAL_SPARE_PAGE_FAILED...
  • Page 126 TLE985x Firmware User Manual Table A-1 List of Possible Errors during Startup (cont’d) Error Name Error Code Errors Description ERR_LOG_CODE_NVM_APPLY_PROTEC Applying of NVM protection from NVM CS failed during TION_FAIL bootup ERR_LOG_CODE_VIRGIN Device is detected as virgin during startup ERR_LOG_CODE_NVM_NOT_AVAILABL NVM HW is not available during startup ERR_LOG_CODE_MBIST_FAILED MBIST test detected an error...
  • Page 127 TLE985x Firmware User Manual Table A-1 List of Possible Errors during Startup (cont’d) Error Name Error Code Errors Description ERR_LOG_CODE_USER_PROTECT_PW nvm_protect_password_set() segment password D_EXISTS already exists when trying to set a new one in ERR_LOG_CODE_NO_PASSWORD_EXIS Password clear: No password installed when trying to clear password ERR_LOG_CODE_USER_PROTECT_WR user_nvm_protect_set(), user_nvm_protect_clear():...
  • Page 128: Appendix B Stack Usage Of User Api Functions

    TLE985x Firmware User Manual Appendix B Stack usage of user API functions This chapter provides a table that lists maximum used stack for each user API function. Table B-1 Maximum used stack for user API functions User API function Maximum stack usage (bytes) user_nvm_write_fast_continue user_nvm_write_fast_verify user_nvm_write_fast_end...
  • Page 129 TLE985x Firmware User Manual Table B-1 Maximum used stack for user API functions (cont’d) User API function Maximum stack usage (bytes) user_dflash_mode user_nvm_service_algorithm user_nvm_ready_poll user_nvm_clk_factor_set Firmware User Manual Revision 1.0 2019-03-05...
  • Page 130: Appendix C Exported Bootrom Functions

    TLE985x Firmware User Manual Appendix C Exported bootROM functions This chapter provides a table that lists all exported bootROM functions and its address that can be called by user code. Table C-1 Exported user API functions User API function BootROM thumb address user_nvm_protect_clear 0x000000a1 user_nvm_protect_set...
  • Page 131 TLE985x Firmware User Manual Table C-1 Exported user API functions (cont’d) User API function BootROM thumb address user_nvm_password_set 0x000000e5 user_nvm_write_fast_start 0x000000e7 user_nvm_write_fast_continue 0x000000e9 user_nvm_write_fast_verify 0x000000eb user_nvm_write_fast_end 0x000000ed Firmware User Manual Revision 1.0 2019-03-05...
  • Page 132: Appendix D Analog Module Trimming (100Tp

    TLE985x Firmware User Manual Appendix D Analog Module Trimming (100TP Pages) The TLE985x contains 8 x 100TP (100 Time Programmable) pages and each page has a size of 128 bytes but only the first 126 Bytes are usable. The last two Bytes of each 100TP page store the programming counter followed by the page checksum Byte.
  • Page 133 TLE985x Firmware User Manual Table D-1 100TP page 0 and page 1 : Analog Module Trimming registers 0x50 ADC1_FILTCOEFF0_13 0x54 ADC1_CAL_CH10_11 0x58 ADC1_CAL_CH8_9 0x5C ADC1_CAL_CH6_7 0x60 ADC1_CAL_CH4_5 0x64 ADC1_CAL_CH2_3 0x68 ADC1_CAL_CH0_1 0x6C ADC1_TH4_7_LOWER 0x70 ADC1_TH0_3_LOWER 0x74 ADC1_OFFSETCALIB 0x78 ADC1_SQ_CH_MAP Example Table D-2 100TP Analog Module Trimming example Code example...
  • Page 134 TLE985x Firmware User Manual Table D-3 Alternative predefined values to trim in case 100TP page 0 and page 1 CRC is incorrect 0x00 SCU_ADC1_CLK 0x00000000 0x04 ADC1_CAL_CH12_13 0x00000000 0x08 ADC1_SQ12_13 0x00000000 0x0C ADC1_PP_MAP4_7 0x08070604 0x10 ADC1_PP_MAP0_3 0x03020100 0x14 ADC1_IRQEN_2 0x00000000 0x18 ADC1_DUIN_SEL 0x00000000...
  • Page 135 TLE985x Firmware User Manual Table D-3 Alternative predefined values to trim in case 100TP page 0 and page 1 CRC is incorrect 0x14 ADC1_SQ0_1 0x00000000 0x18 ADC1_CTRL3 0x00020A01 0x1C ADC1_MAX_TIME 0x00000000 0x20 ADC1_CHX_ESM 0x00000000 0x24 ADC1_CHX_EIM 0x00000000 Firmware User Manual Revision 1.0 2019-03-05...
  • Page 136: Appendix E Execution Time Of Bootrom User Api Functions

    TLE985x Firmware User Manual Appendix E Execution time of BootROM User API Functions This appendix provides a table that lists the execution time of the BootROM User API functions. Table E-1 User API execution time User API Function Execution Time [µs] user_adc1_offset_calibration 28.8...
  • Page 137 TLE985x Firmware User Manual Table E-1 User API execution time (cont’d) User API Function Execution Time [µs] user_ram_mbist (4k RAM) user_vbg_temperature_get 1) Execution time relative to the following conditions : 40MHz, 25°C, 12V Firmware User Manual Revision 1.0 2019-03-05...
  • Page 138 Trademarks of Infineon Technologies AG AURIX™, C166™, CanPAK™, CIPOS™, CoolGaN™, CoolMOS™, CoolSET™, CoolSiC™, CORECONTROL™, CROSSAVE™, DAVE™, DI-POL™, DrBLADE™, EasyPIM™, EconoBRIDGE™, EconoDUAL™, EconoPACK™, EconoPIM™, EiceDRIVER™, eupec™, FCOS™, HITFET™, HybridPACK™, Infineon™, ISOFACE™, IsoPACK™, i- Wafer™, MIPAQ™, ModSTACK™, my-d™, NovalithIC™, OmniTune™, OPTIGA™, OptiMOS™, ORIGA™, POWERCODE™, PRIMARION™, PrimePACK™, PrimeSTACK™, PROFET™, PRO-SIL™, RASIC™, REAL3™, ReverSave™, SatRIC™, SIEGET™, SIPMOS™, SmartLEWIS™, SOLID FLASH™, SPOC™, TEMPFET™,...

Table of Contents