Firmware User Manual (AE-step)
73
Revision 1.02
2019-04-24
TLE984x Firmware User Manual
User Routines
6
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.
6.1
List of Supported Features
• Read and write the various 100TP pages inside the NVM.
• Read, write and erase the NVM pages and sectors.
• Configure the BSL parameter (e.g. Interface selection, timeout configuration, LIN address).
• Retrieve the customer identification number.
• Perform a RAM MBIST test.
• Check for ECC single- and double-errors on NVM and RAM.
All library functions are accessible over a branch table, where the user mode software can directly jump to.
The branch table is stored at a fix location and in return branches to the function implementation.
An API reference to the user routines is given in
“User API Routines” on Page 75
.
6.2
Reentrance Capability and Interrupts
With the exception of a few functions,
no
support is provided for reentrance of user API routines – user calls
must be atomic (i.e., they must not be interrupted and reentered before completion). The customer
application must not call these routines from different multitask levels (e.g. different thread/interrupt levels).
As user API routines are potentially timimg dependent, it is recommended to disable interrupts prior to calling
API routines.
6.3
Parameter Checks
Some of the user API implementations use pointers to exchange data with the API. All pointers must point to
a valid RAM address range. If the address points outside the valid RAM area, an error code is returned.
Other routines support branching or callbacks. If the callback is different from zero, it must point to a valid
NVM or RAM range. Otherwise an error is returned.
6.4
NVM Region Write Protection Check
The user API functions writing to a page in NVM or NVM-CS check for NVM region write protection, and return
an error code if the protection is set for that page.
6.5
Watchdog handling when using NVM functions
The execution time of all user API functions is given in
“Appendix F – Execution time of BootROM User API
. This has to be observed for watchdog timeout calculations, especially when NVM
operations are involved (programming or erase). Prior to invoking NVM write routines, it is recommended to
do the following:
• Perform a short-open-window trigger to WDT1 before a NVM operation is called
• Invoke NVM write routine
• Reconfigure watchdog for normal operation