我在引脚初始化配置中将 PTC2 设置为 CAN RX 模式。
我可以在运行时将 PTC2 更改为 EIRQ[2] 吗?
无需更改引脚初始化配置。
而且,在运行时回到 CAN RX 模式?
谢谢
const Siul2_Port_Ip_PinSet
tingsConfig g_pin_mux_InitConfigArr0[NUM_OF_CONFIGURED_PINS0] =
{
{
.base = IP_SIUL2,
.pinPortIdx = 66u,
.mux = PORT_MUX_AS_GPIO,
.safeMode = PORT_SAFE_MODE_DISABLED,
.inputFilter = PORT_INPUT_FILTER_DISABLED,
.driveStrength = PORT_DRIVE_STRENTGTH_DISABLED,
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
.slewRateCtrlSel = PORT_SLEW_RATE_SLOWEST,
.pullKeep = PORT_PULL_KEEP_DISABLED,
.invert = PORT_INVERT_DISABLED,
.inputBuffer = PORT_INPUT_BUFFER_ENABLED,
.outputBuffer = PORT_OUTPUT_BUFFER_DISABLED,
.adcInterleaves = { MUX_MODE_NOT_AVAILABLE, MUX_MODE_NOT_AVAILABLE },
.inputMuxReg = {
0u
},
.inputMux = {
PORT_INPUT_MUX_ALT1,
PORT_INPUT_MUX_NO_INIT,
PORT_INPUT_MUX_NO_INIT,
PORT_INPUT_MUX_NO_INIT,
PORT_INPUT_MUX_NO_INIT,
PORT_INPUT_MUX_NO_INIT,
PORT_INPUT_MUX_NO_INIT,
PORT_INPUT_MUX_NO_INIT
},
},
};