Other Parts Discussed in Thread: SYSCONFIG
器件型号: CC2340R5
主题: SysConfig 中讨论的其他器件
您好:
使用 8mA 驱动电流设置时、建议的驱动强度 (IOSTR) 设置是多少?

是否建议使用最大驱动强度? 还是应该将其保留为 Auto?
Munan
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Other Parts Discussed in Thread: SYSCONFIG
器件型号: CC2340R5
主题: SysConfig 中讨论的其他器件
您好:
使用 8mA 驱动电流设置时、建议的驱动强度 (IOSTR) 设置是多少?

是否建议使用最大驱动强度? 还是应该将其保留为 Auto?
Munan
您好 Alex、
是的、这可以 使用 SysConfig 来配置具有驱动强度的引脚、但同样重要的是要实际写出针对此功能的建议设置、因为并非每个客户都在使用 SysConfig、然后每位查看本文的用户都需要进入 SysConfig 并配置 GPIO 以查看其内容。
值得注意的是、SysConfig 似乎将 IOSTR 保留为默认值“auto“、除非您让它降低压摆率:

如果您查看此功能的 TRM 说明、也会看到:

实际上并不清楚哪个最终控制引脚的拉电流或灌电流能力。 SysConfig 似乎意味着 IOSTR 仅控制压摆率、但 TRM 似乎意味着、要在任何电源电压情况下实际从高驱动引脚中获得 8 个–10mA(无论是否建议由用户决定)、您需要覆盖 IOSTR 的自动设置并将其设置为最大值。 还是 TRM 说自动设置会为您自动实现?
想法?
Munan
您好:
具有与 SysConfig 相关定义的实际文件为 GPIOLPF3.h、位于以下位置:
#define GPIO_CFG_DRVSTR_LOW_INTERNAL (IOC_CONFIG_DRIVE_strength_2mA)
#define GPIO_CFG_DRVSTR_MED_INTERNAL (IOC_CONFIG_DRIVE_strength_4mA)
#define GPIO_CFG_DRVSTR_HIGH_INTERNAL (IOC_CONFIG_DRIVE_STR_8mA)
SysConfig 会将其提取:
将 SysConfig GPIO 设置为中等强度会将 ti_drivers_config.c GPIO 设置为 GPIO_CFG_OUT_STR_MED
然后将其抽象到
您可能还可以使用直接设置寄存器:
//*****************************************************************************
//
// API Functions and prototypes
//
//*****************************************************************************
//*****************************************************************************
//
//! \brief Set the configuration and mux option for a specific DIO.
//!
//! \param dioNumber specifies the DIO to configure (0-25).
//!
//! \param config The configuration to apply. This is a bitwise OR of
//! - One of the \ref ioc_config_drive_strength_options
//! "IOC Config drive strength options"
//! - One of the \ref ioc_config_slew_rate_options
//! "IOC Config slew rate options"
//! - One of the \ref ioc_config_pull_control_options
//! "IOC Config pull control options"
//! - One of the \ref ioc_config_edge_detection_options
//! "IOC Config edge detection options"
//! - One of the \ref ioc_config_standby_wakeup_options
//! "IOC Config standby wakeup options"
//! - One of the \ref ioc_config_shutdown_wakeup_options
//! "IOC Config shutdown wakeup options"
//! - One of the \ref ioc_config_io_invert_options
//! "IOC Config IO invert options"
//! - One of the \ref ioc_config_io_mode_options "IOC Config IO mode options"
//! - One of the \ref ioc_config_input_buffer_options
//! "IOC Config input buffer options"
//! - And one of the \ref ioc_config_hysteresis_options
//! "IOC Config hysteresis options"
//!
//! \param mux Selects the function of the DIO. It must be one of the following:
//! - \ref IOC_MUX_GPIO
//! - \ref IOC_MUX_DTB
//! - \ref IOC_MUX_ANALOG
//! - \ref IOC_MUX_PERIPH_FUNC1
//! - \ref IOC_MUX_PERIPH_FUNC2
//! - \ref IOC_MUX_PERIPH_FUNC3
//! - \ref IOC_MUX_PERIPH_FUNC4
//! - \ref IOC_MUX_PERIPH_FUNC5
//
//*****************************************************************************
__STATIC_INLINE void IOCSetConfigAndMux(uint32_t dioNumber, uint32_t config, uint32_t mux)
{
// Check the arguments.
ASSERT(dioNumberLegal(dioNumber));
ASSERT((config & IOC_CONFIG_ALL_M) == config);
ASSERT((mux & IOC_IOC0_PORTCFG_M) == mux);
// Set the config and mux option for the specified DIO.
HWREG(IOC_BASE + IOC_O_IOC0 + dioNumber * IOC_REG_SPACING) = config | mux;
}
此致、
Alex F