This is an overview of the TLE9201SG and the OSS-ECAL offering for the TLE9201SG. The TLE9201SG is a MOTIX™ full-bridge IC for BDC motors manufactured by Infineon.
MCU interface : SPI and GPIO
CAUTION:Please be sure to refer to the latest version of the Datasheet prior to actual design.
TLE9201SG
Overview
The TLE9201SG is a general purpose 6 A H-Bridge, designed for (but not limited to) the control of DC motors or other inductive loads in automotive applications. The outputs can be pulse width modulated at frequencies up to 20kHz. PWM/DIR control reduces the number of PWM capable pins needed on the microcontroler side.
For load currents above the current limitation threshold (8A typ.) the H-Bridge goes into chopper current limitation mode. It is protected against short circuits and overtemperature and provides extensive diagnosis via SPI or basic error feedback via error flag. Open load can be detected when the bridge is disabled or during PWM operation of inductive loads.
The robust PG-DSO-12-17 package provides excellent thermal capabilites due to the thick copper heat slug.
Thanks to the protruding edges of the heatslug the package is well suited for automatic optical solder inspection.
Feature
- RDSon of 100 mΩ per switch typ. at Tj=25 °C
- Logic inputs 3.3 V and 5.0 V TTL/CMOS-compatible
- Low standby current
- Chopper current limitation
- Short circuit shut down with latch behavior
- Overtemperature shut down with latch behavior
- VS undervoltage shutdown
- Open load detection in ON and OFF state
- Detailed SPI diagnosis or simple error flag
- Green product (RoHS compliant)
- AEC qualified
OSS-ECAL specification
API Function
OSS-ECAL API functions are basically assumed to be function calls from a periodic Thread (TASK).
etSTS oTLE9201SG_SPI_CONFIG( void )
The oTLE9201SG_SPI_CONFIG function is an API function that configures SPI.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error |
etSTS oTLE9201SG_INIT( void )
The oTLE9201SG_INIT function is an API function that initializes the TLE9201SG in the following steps.
TLE9201SG_PIN_VSO | control mode* | Processing |
---|---|---|
VSO pin Valid iUSE | PWM | Step1: VSO pin = Hi Step2: iTLE9201SG_OUTPUT_WUP_DELAY_MS wait Step3: DIS pin = Low Step4: iTLE9201SG_OUTPUT_DIS_DELAY_US wait Step5: DIR pin = Low Step6: PWM 0% Step7: PWM control mode setting (Register CTRL_REG OLDIS=1, SIN=0, SEN=0, SDIR=0, SPWM=0) Step8: iTLE9201SG_OUTPUT_ENA_DELAY_US wait |
SPI | Step1: VSO pin = Hi Step2: iTLE9201SG_OUTPUT_WUP_DELAY_MS wait Step3: SPI control mode setting (Register CTRL_REG OLDIS=1, SIN=1, SEN=1, SDIR=0, SPWM=0 ) Step4: iTLE9201SG_OUTPUT_ENA_DELAY_US wait | |
VSO pin Invalid iDONT_USE | PWM | Step1: DIS pin = Low Step2: iTLE9201SG_OUTPUT_DIS_DELAY_US wait Step3: DIR pin = Low Step4: PWM 0% Step5: PWM control mode setting (Register CTRL_REG OLDIS=1, SIN=0, SEN=0, SDIR=0, SPWM=0) Step6: iTLE9201SG_OUTPUT_ENA_DELAY_US wait |
SPI | Step1: SPI control mode setting (Register CTRL_REG OLDIS=1, SIN=1, SEN=1, SDIR=0, SPWM=0 ) Step2: iTLE9201SG_OUTPUT_ENA_DELAY_US wait |
*: Value of TLE9201SG_START_MODE (PWM: iTLE9201SG_PWM_MODE, SPI: iTLE9201SG_SPI_MODE)
TLE9201SG_START_MODE is the set value of control mode after Wake-up.
NOTE :
The iTLE9201SG_OUTPUT_WUP_DELAY_MS [ms] elapsed measurement is calculated from the Thread period that calls this function, so set the Thread period to THREAD_OSS_ECAL_PERIOD [ms].
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_EXE | During execution | ||
eSTS_ERR_PARAMETER | In any of the following cases – GPIO pin selection error – PWM pin selection error | ||
eSTS_ERR_COMMAND | Call this API function during Initialization mode or Sleep mode | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_PWM_OBJECT | PWM object selection error | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
eSTS_ERR_HAL_PWM | HAL PWM error |
etSTS oTLE9201SG_PWM_SPI_MODE_SELECT( uint8 mode )
The oTLE9201SG_PWM_SPI_MODE_SELECT function is an API function that sets the PWM control mode or SPI control mode based on the mode value.
mode | Processing |
---|---|
iTLE9201SG_PWM_MODE (PWM control mode) | Step1: DIS pin = Low Step2: iTLE9201SG_OUTPUT_DIS_DELAY_US wait Step3: DIR pin = Low Step4: PWM 0% Step5: PWM control mode setting (Register CTRL_REG OLDIS=1, SIN=0, SEN=0, SDIR=0, SPWM=0 ) |
iTLE9201SG_SPI_MODE (SPI control mode) | Step1: SPI control mode setting (Register CTRL_REG OLDIS=1, SIN=1, SEN=1, SDIR=0, SPWM=0 ) |
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_PARAMETER | In any of the following cases – GPIO pin selection error – PWM pin selection error | ||
eSTS_ERR_COMMAND | Call this API function in Sleep mode | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_PWM_OBJECT | PWM object selection error | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_PWM | HAL PWM error | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter IN | uint8 mode | Selection of PWM control mode or SPI control mode | PWM control mode: iTLE9201SG_PWM_MODE SPI control mode: iTLE9201SG_SPI_MODE |
etSTS oTLE9201SG_DIR_PWM_SET( float32 dir_duty )
The oTLE9201SG_DIR_PWM_SET function is an API function that performs DIR and PWM output based on the value of dir_duty.
mode | dir_duty | DIR | Duty |
---|---|---|---|
PWM control mode | dir_duty < 0.0f | Reverse: DIR pin = Low | PWM = -dir_duty |
dir_duty >= 0.0f | Forward: DIR pin = Hi | PWM = dir_duty | |
SPI control mode* | dir_duty < 0.0f | Reverse: Register CTRL_REG SDIR = 0 | Register CTRL_REG SPWM = 1 |
dir_duty > 0.0f | Forward: Register CTRL_REG SDIR = 1 | Register CTRL_REG SPWM = 1 | |
dir_duty = 0.0f | Reverse: Register CTRL_REG SDIR = 0 | Register CTRL_REG SPWM = 0 |
*: In SPIcontrol mode, OLDIS=1
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_PARAMETER | In any of the following cases – GPIO pin selection error – PWM pin selection error – PWM output setpoint -100% to 100% out of range | ||
eSTS_ERR_COMMAND | Call this API function in modes other than PWM control mode or SPI control mode | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_PWM_OBJECT | PWM object selection error | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_PWM | HAL PWM error | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter IN | float32 dir_duty | DIR and PWM setpoints[%] |
etSTS oTLE9201SG_OL_OFF_STATE( uint8* dia )
The oTLE9201SG_OL_OFF_STATE function is an API function that performs Open Load Detection in OFF state for TLE9201SG, reads the value of Register DIA_REG, and stores it in dia according to the following procedure. Please use PWM control mode.
Step1: DIS pin = Hi
Step2: iTLE9201SG_OUTPUT_DIS_DELAY_US wait
Step3: Open Load OFF State setting (Register CTRL_REG OLDIS = 0)
Step4: Register DIA_REG clear
Step5: iTLE9201SG_OUTPUT_OL_OFF_DELAY_US wait
Step6: Register DIA_REG read
Step7: Open Load OFF State release (Register CTRL_REG OLDIS = 1)
Step8: DIS pin = Low
Step9: iTLE9201SG_OUTPUT_DIS_DELAY_US wait
Step10: Save the readout value of Step6 in dia
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_PARAMETER | In any of the following cases – GPIO pin selection error – PWM pin selection error | ||
eSTS_ERR_COMMAND | Call this API function in modes other than PWM control mode | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_PWM_OBJECT | PWM object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter OUT | uint8* dia | Register DIA_REG read value |
etSTS oTLE9201SG_OL_ON_STATE( uint8* dia )
The oTLE9201SG_OL_ON_STATE function is an API function that performs Open Load Detection in ON state for TLE9201SG, reads the value of Register DIA_REG, and stores it in dia according to the following procedure. Please use PWM control mode.
Step1: DIR pin = Hi
Step2: PWM = TLE9201SG_OL_ON_DUTY_TEST
Step3: iTLE9201SG_HS_RISE_TIME_US + (1000000U / TLE9201SG_PWM_FREQ) * 5U) wait
Step4: Register DIA_REG read
Step5: Save the readout value of Step4 in dia.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_PARAMETER | In any of the following cases – GPIO pin selection error – PWM pin selection error – PWM output setpoint -100% to 100% out of range | ||
eSTS_ERR_COMMAND | Call this API function in modes other than PWM control mode | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_PWM_OBJECT | PWM object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
eSTS_ERR_HAL_PWM | HAL PWM error | ||
Parameter OUT | uint8* dia | Register DIA_REG read value |
etSTS oTLE9201SG_DISABLE( void )
oTLE9201SG_DISABLE function is an API function that sets TLE9201SG to Disable state by the following procedure. Please use PWM control mode.
Step1: MOSFET on ( DIS pin = Hi )
Step2: iTLE9201SG_OUTPUT_DIS_DELAY_US wait
Step3: Reverse ( DIR pin = Low )
Step4: PWM 0%
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_PARAMETER | In any of the following cases – GPIO pin selection error – PWM pin selection error | ||
eSTS_ERR_COMMAND | Call this API function in modes other than PWM control mode | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_PWM_OBJECT | PWM object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_PWM | HAL PWM error |
etSTS oTLE9201SG_SLEEP( void )
The oTLE9201SG_SLEEP function is an API function that sets the TLE9201SG to Sleep (VSO pin = Low) by the following procedure. This API function is used when VSO operation is enabled (iTLE9201SG_PIN_VSO = iUSE).
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_PARAMETER | GPIO pin selection error | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL |
etSTS oTLE9201SG_WAKEUP( void )
oTLE9201SG_WAKEUP function is an API function to wake-up TLE9201SG from initial mode or Sleep mode by the following procedure.
TLE9201SG_PIN_VSO | TLE9201SG_START_MODE | Processing |
---|---|---|
VSO pin Valid iUSE | PWM control mode (iTLE9201SG_PWM_MODE) | Step1: Power on ( VSO = Hi ) Step2: iTLE9201SG_OUTPUT_WUP_DELAY_MS wait Step3: DIS pin = Low Step4: iTLE9201SG_OUTPUT_DIS_DELAY_US wait Step5: DIR pin = Low Step6: PWM 0% Step7: PWM control mode setting (Register CTRL_REG OLDIS=1, SIN=0, SEN=0, SDIR=0, SPWM=0) |
SPI control mode (iTLE9201SG_SPI_MODE) | Step1: Power on ( VSO = Hi ) Step2: iTLE9201SG_OUTPUT_WUP_DELAY_MS wait Step3: SPI control mode setting (Register CTRL_REG OLDIS=1, SIN=1, SEN=1, SDIR=0, SPWM=0 ) | |
VSO pin Invalid iDONT_USE | PWM control mode (iTLE9201SG_PWM_MODE) | Step1: DIS pin = Low Step2: iTLE9201SG_OUTPUT_DIS_DELAY_US wait Step3: DIR pin = Low Step4: PWM 0% Step5: PWM control mode setting (Register CTRL_REG OLDIS=1, SIN=0, SEN=0, SDIR=0, SPWM=0) |
SPI control mode (iTLE9201SG_SPI_MODE) | Step1: SPI control mode setting (Register CTRL_REG OLDIS=1, SIN=1, SEN=1, SDIR=0, SPWM=0 ) |
NOTE :
The iTLE9201SG_OUTPUT_WUP_DELAY_MS [ms] elapsed measurement is calculated from the Thread period that calls this function, so set the Thread period to THREAD_OSS_ECAL_PERIOD [ms].
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_PARAMETER | In any of the following cases – GPIO pin selection error – PWM pin selection error | ||
eSTS_ERR_COMMAND | Call this API function during Initialization mode or Sleep mode | ||
eSTS_ERR_GPIO_OBJECT | GPIO object selection error | ||
eSTS_ERR_PWM_OBJECT | PWM object selection error | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_PWM | HAL PWM error | ||
eSTS_ERR_HAL_SPI | HAL SPI error |
etSTS oTLE9201SG_RD_DIA( uint8* rlt )
The oTLE9201SG_RD_DIA function is an API function that reads the value of Register DIA_REG and stores it in rlt.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter OUT | uint8* rlt | Register DIA_REG read value |
etSTS oTLE9201SG_RES_DIA( void )
The oTLE9201SG_RES_DIA function is an API function that clears the value of Register DIA_REG.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error |
etSTS oTLE9201SG_RD_REV( uint8* rlt )
The oTLE9201SG_RD_REV function is an API function that reads the value of Register REV_REG and stores it in rlt.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter OUT | uint8* rlt | Register DIA_REG read value |
etSTS oTLE9201SG_RD_CTRL( uint8* rlt )
The oTLE9201SG_RD_REV function is an API function that reads the value of Register CTRL_REG and stores it in rlt.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter OUT | uint8* rlt | Register CTRL_REG read value |
etSTS oTLE9201SG_WR_CTRL( uint8 val )
The oTLE9201SG_WR_CTRL function is an API function that writes the value of val & 0x1f to the register CTRL_REG.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter IN | uint8 val | Register CTRL_REG write value |
etSTS oTLE9201SG_WR_CTRL_RD_DIA( uint8 val, uint8* rlt )
The oTLE9201SG_WR_CTRL_RD_DIA function is an API function that writes the value of val & 0x1f to Register CTRL_REG, then reads Register CTRL_REG and saves it to rlt.
val should be set by combining the bits of CTRL_REG from the table below.
Bit name | Bit | Summary |
---|---|---|
iTLE9201SG_OLDIS | b4 | Open Load Disconnect |
iTLE9201SG_SIN | b3 | Control output PWM/DIR or SPI |
iTLE9201SG_SEN | b2 | Enable/Disable SPI control |
iTLE9201SG_SDIR | b1 | DIR SPI control |
iTLE9201SG_SPWM | b0 | PWM SPI control |
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_SPI_OBJECT | SPI object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_SPI | HAL SPI error | ||
Parameter IN | uint8 val | Register CTRL_REG write value | |
Parameter OUT | uint8* rlt | Register CTRL_REG read value |
Settings at the time of provision
Common setting value
The common setting values when provided are the values in user_setting.h in the table below. Please change them according to each product.
Label name | Summary | Set value |
---|---|---|
THREAD_OSS_ECAL_PERIOD | Thread/Task cycle[ms] | 10U |
iTLE9201SG_PIN_VSO | VSO output signal presence iUSE: Valid iDONT_USE: Invalid | iDONT_USE |
TLE9201SG_START_MODE | Default value of Control mode iTLE9201SG_PWM_MODE: PWM control mode iTLE9201SG_SPI_MODE: SPI control mode | iTLE9201SG_PWM_MODE |
TLE9201SG_PIN_VSO_SIG | Specifies non-inverted or inverted VSO output signal iNORMAL: Non-inverted iREVERSE: Inverted | iNORMAL |
TLE9201SG_PIN_DIS_SIG | Specifies non-inverted or inverted DIS output signal iNORMAL: Non-inverted iREVERSE: Inverted | iNORMAL |
TLE9201SG_PIN_DIR_SIG | Specifies non-inverted or inverted DIR output signal iNORMAL: Non-inverted iREVERSE: Inverted | iNORMAL |
TLE9201SG_OL_ON_DUTY_TEST | PWM duty value when open load detection is in ON state[%] | 40.0F (40.0%) |
CMP_PWM_NUM | Number of PWM objects used in OSS-ECAL | 1U |
PWM_PIN_NUM | Number of PWM pins used in OSS-ECAL | 1U |
TLE9201SG_PWM_FREQ | PWM period [Hz] | 20000U (20.0kHz) |
CMP_GPIO_NUM | Number of GPIO objects used in OSS-ECAL | 1U |
GPIO_PIN_NUM | Number of GPIOs used in OSS-ECAL | 3U |
CMP_SPI_NUM | Number of SPI objects used in OSS-ECAL | 1U |
HZ_TLE9201SG | SPI communication baud rate[bps] | 1000000U (1Mbps) |
SPI_RETRY | Number of retries when SPI communication error occurs | 3U |
ESP32 HAL setting values
The ESP32 HAL setting values when provided are the values in user_setting.h in the table below. Please change them according to each product.
Label name | Summary | Setting values |
---|---|---|
PWM_TLE9201SG_TIMER | PWM Timer Object | LEDC_TIMER_0 |
PIN_TLE9201SG_PWM | PWM pin | GPIO_NUM_8 |
TLE9201SG_PWM_CHANNEL | PWM Timer Object Channels | LEDC_CHANNEL_0 |
PWM_TLE9201SG_MODE | LEDC speed mode | LEDC_LOW_SPEED_MODE |
TLE9201SG_PWM_RESOLUTION_BITS | PWM resolution (10-bit = 0~1023 duty) | LEDC_TIMER_10_BIT |
PIN_TLE9201SG_DIS | DIS pin | GPIO_NUM_1 |
PIN_TLE9201SG_DIR | DIR pin | GPIO_NUM_2 |
PIN_TLE9201SG_VSO | VSO pin Only if iTLE9201SG_PIN_VSO=iUSE | GPIO_NUM_3 |
PIN_MOSI | MOSI pin | GPIO_NUM_6 |
PIN_MISO | MISO pin | GPIO_NUM_5 |
PIN_SCLK | SCLK pin | GPIO_NUM_4 |
PIN_TLE9201SG_CS | CS pin | GPIO_NUM_7 |
SPI_TLE9201SG_CFG | SPI_TLE9201SG_CFG is a global variable in the argument const spi_device_interface_config_t *dev_config of the following spi_bus_add_device function. Define this variable according to the definition of the spi_bus_add_device function. esp_err_t spi_bus_add_device(spi_host_device_t host, const spi_device_interface_config_t *dev_config, spi_device_handle_t *handle) | vgTLE9201SG_CONFIG |
SPI_TLE9201SG | SPI_TLE9201SG is a global variable for the argument spi_device_handle_t *handle of the following spi_bus_add_device function. Define this variable according to the definition of the spi_bus_add_device function. esp_err_t spi_bus_add_device(spi_host_device_t host, const spi_device_interface_config_t *dev_config, spi_device_handle_t *handle) | vgTLE9201SG_HANDLE |
ModusToolbox mtb-hal-cat1 setting values
The ModusToolbox mtb-hal-cat1 setting values when provided are the values in user_setting.h in the table below. Please change them according to each product.
Label name | Summary | Setting values |
---|---|---|
PWM_TLE9201SG | SPI_TLE9201SG is a global variable for the argument cyhal_pwm_t obj of the following cyhal_pwm_init function. Define this variable according to the definition of the cyhal_pwm_init function. #define cyhal_pwm_init( obj, pin, clk ) | vgPWM_OBJ |
PIN_TLE9201SG_PWM | PWM pin | P7_1 |
PIN_TLE9201SG_DIS | DIS pin | P5_4 |
PIN_TLE9201SG_DIR | DIR pin | P5_5 |
PIN_TLE9201SG_VSO | VSO pin Only if iTLE9201SG_PIN_VSO=iUSE | P5_6 |
PIN_MOSI | MOSI pin | P9_0 |
PIN_MISO | MISO pin | P9_1 |
PIN_SCLK | SCLK pin | P9_2 |
SPI_TLE9201SG | SPI_TLE9201SG is a global variable for the argument cyhal_spi_t* obj of the following cyhal_spi_init function. Define this variable according to the definition of the cyhal_spi_init function. cy_rslt_t cyhal_spi_init(cyhal_spi_t* obj, cyhal_gpio_t mosi, cyhal_gpio_t miso, cyhal_gpio_t sclk, cyhal_gpio_t ssel, const cyhal_clock_t * clk, uint8_t bits, cyhal_spi_mode_t mode, bool is_slave) | vgSPI_OBJ |
PIN_TLE9201SG_CS | CS pin | P9_3 |
STM32CubeF4 setting values
The STM32CubeF4 setting values when provided are the values in user_setting.h in the table below. Please change them according to each product.
Label name | Summary | Setting values |
---|---|---|
TIME_DELAY | Timer object for measuring elapsed time | htim2 |
PWM_TLE9201SG_TIMER | PWM Timer Object | htim4 |
TLE9201SG_PWM_CHANNEL | PWM Timer Object Channels | TIM_CHANNEL_1 |
TLE9201SG_PWM_TIMER_PERIOD | PWM Cycle | 3199U (20kHz=50µs) LSB = 0.015625 µs |
GPIO_TLE9201SG_DIS | DIS GPIO Object | GPIOA |
PIN_TLE9201SG_DIS | DIS pin | GPIO_PIN_9 |
GPIO_TLE9201SG_DIR | DIR GPIO object | GPIOA |
PIN_TLE9201SG_DIR | DIR pin | GPIO_PIN_10 |
GPIO_TLE9201SG_VSO | VSO GPIO object Only if iTLE9201SG_PIN_VSO=iUSE | GPIOA |
PIN_TLE9201SG_VSO | VSO pin Only if iTLE9201SG_PIN_VSO=iUSE | GPIO_PIN_12 |
SPI_TLE9201SG | SPI Object | hspi2 |
GPIO_TLE9201SG_CS | CS GPIO Object | GPIOC |
PIN_TLE9201SG_CS | CS pin | GPIO_PIN_8 |
Sample Applications
The sample application is provided as oss_ecal function in smple.c.
The oss_ecal function API can be used to execute TLE9201SG’s oss-ECAL API functions by setting the commands in the table below in the global variable vgTLE9201SG.cmd.
Command | Summary |
---|---|
iTLE9201SG_SPI_CONFIG | SPI configuration command |
iTLE9201SG_INI_MODE | Initialize command |
iTLE9201SG_SPI_MODE | SPI control mode command |
iTLE9201SG_PWM_MODE | PWM control mode command |
iTLE9201SG_SLP_MODE | Sleep mode command Do this when the VSO pin is enabled. |
iTLE9201SG_DIS_MODE | Disable mode command Please do this when in PWM control mode. |
iTLE9201SG_DIR_PWM_SET | PWM duty 設定command |
iTLE9201SG_OL_OFF_STATE | Open load OFF command Please do this when in PWM control mode. |
iTLE9201SG_OL_ON_STATE | Open load ON command Please do this when in PWM control mode. |
iTLE9201SG_WAKEUP | Wake-up command |
iTLE9201SG_RD_DIA | RD_DIA command |
iTLE9201SG_RES_DIA | RES_DIA command |
iTLE9201SG_RD_REV | RD_REV command |
iTLE9201SG_RD_CTRL | RD_CTRL command |
iTLE9201SG_WR_CTRL | WR_CTRL command |
iTLE9201SG_WR_CTRL_RD_DIA | WR_CTRL_RD_DIA command |
HAL Support List
OSS-ECAL’s HAL support is as follows. Please note that even if the same HAL is used, different versions, MCUs, and development environments may not work together. The list is being expanded sequentially.
Manufacturer | SDK/IDE Tool | HAL Name | Ver | HALNAME | Support |
---|---|---|---|---|---|
Arduino | Arduino IDE | Arduino | 1.8.6 | ARDUINO | – |
Debian | – | GNU/Linux | 10.3 | Linux | – |
Espressif | ESP-IDF | HAL | v5.5 | ESP32 | X |
Infineon | ModusToolbox | mtb-hal-cat1 | 2.4.3 | ModusToolbox | X |
NXP | MCUXpresso SDK | SDK_2.x_EVKB-IMXRT1050 | 2.16 | iMXRT1051B1052B | – |
Renesas | Synergy Software Package | HAL | 2.6.0 | SSP | – |
STMicroelectronics | STM32Cube | STM32CubeF4 | V1.28.1 | STM32F4 | X |
Development environment
The MCU and development environment during OSS-ECAL development are as follows.
HALNAME | Manufacturer | Board | MCU | IDE |
---|---|---|---|---|
ARDUINO | Arduino | 1.Mega 2560 Rev3 2.Arduino Pro Mini 3.3V | ATmega2560 ATmega328P | Arduino IDE 2.3.3 |
ESP32 | Espressif | ESP32-C3-DevKitC-02 | ESP32-C3-WROOM-02U | Espressif-IDE |
Linux | BeagleBoard | BeagleBone Black | TI AM335x | – |
ModusToolbox | Infineon | CY8CPROTO-063-BLE PSoC 6 BLE Prototyping Kit | CYBLE-416045-02 | ModusToolbox |
iMXRT1051B1052B | NXP | IMXRT1050-EVKB | i.MX RT1050 | MCUXpresso IDE |
SSP | Renesas | S7G2 SK | R7FS7G27H3A01CFC | e² studio for Renesas Synergy |
STM32F4 | STMicroelectronics | STM32 Nucleo-64 boards | STM32F401RETx | STM32CubeIDE |
File Structure
Folder* | File | Summary |
---|---|---|
TLE9201SG_HALNAME_VERSION/sample | sample.c | Sample application program |
sample.h | Sample application header | |
TLE9201SG_HALNAME_VERSION | oTLE9201SG.c | OSS-ECAL program for TLE9201SG |
oTLE9201SG.h | OSS-ECAL header for TLE9201SG | |
oss_ecal.h | OSS-ECAL common header | |
user_setting.c | User configured constants and tables | |
user_setting.h | User configuration Header | |
readme.md | Readme | |
OSS-ECAL Terms of Use.txt | OSS-ECAL Terms of Use |
* For HALNAME, please refer to HAL Support.
OSS-ECAL Download Contact
Please login before contacting us for downloads.
To register as a new user, click here.
Built-in How to
How to incorporate OSS-ECAL into user programs
How to incorporate multiple OSS-ECALs in a user program (same MCU function)
How to incorporate multiple OSS-ECALs in a user program (different MCU function)
How to incorporate multiple identical electronic components into a user program
How to reduce the impact on user programs by replacing electronic components
CAUTION
The sample version of OSS-ECAL is not intended to be used with Threads (Tasks) or interrupts of different priority. Please do not use it as in the example below.
Example: If each sensor is assigned to the same ADC group and the OSS-ECAL API is executed in processes with different priorities, correct values may not be obtained.
ADC Gr0 Ch0 Temperature sensor AD22100A 100ms cycle Thread (low priority) to take in temperature
ADC Gr0 Ch1 Pressure sensor MPX5999D Event interrupts (high priority) to take pressure