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.

TMS320F28388D: 关于GPyLOCK及GPyCR寄存器的疑问

Part Number: TMS320F28388D


如题 请问GPyLOCK及GPyCR这两个寄存器的作用是什么呢?

在TRM没有看到描述

从字面理解 LOCK的意思是禁止更改配置吗

GPIO_unlockPortConfig(GPIO_PORT_A, 0xFFFFFFFF);

函数定义如下

static inline void
GPIO_unlockPortConfig(GPIO_Port port, uint32_t pinMask)
{
volatile uint32_t *gpioDataReg;

//
// Get the starting address of the port's registers and write to the lock.
//
gpioDataReg = (uint32_t *)((uintptr_t)GPIOCTRL_BASE) +
((uint32_t)port * GPIO_CTRL_REGS_STEP);

EALLOW;
gpioDataReg[GPIO_GPxLOCK_INDEX] &= ~pinMask;
EDIS;
}

如上述代码 传递给unlock函数的参数是0xFFFFFFFF,即pinMask的值为0xFFFFFFFF

执行gpioDataReg[GPIO_GPxLOCK_INDEX] &= ~pinMask;

LOCK寄存器会被清零

再有就是 GPyCR这个寄存器的作用是什么呢?所谓的commit是什么意思?会产生什么控制效果

这个寄存器每个bit的R/WOnce是什么意思?这里的once指的是什么?