目前正在调试TMS570LS1227的SCI multi-buffer用法,从规格书中了解到LS1227这个片子的sci具有8个字节的buffer,看用法说明,是说将GCR1中的bit10即mbuf mode位置1,将SCIFORMAT寄存器的bit 16-bit18全部写1就可以实现multi-buffer功能,但是我尝试在HALCOGEN生产的代码中修改这几个bit,可是参数无法修改,如图在sciInit函数中修改,
/** - global control 1 */
sciREG->GCR1 = (uint32)((uint32)1U << 25U) /* enable transmit */
| (uint32)((uint32)1U << 24U) /* enable receive */
| (uint32)((uint32)1U << 10U) /* mbuf mode */
| (uint32)((uint32)1U << 5U) /* internal clock (device has no clock pin) */
| (uint32)((uint32)(1U-1U) << 4U) /* number of stop bits */
| (uint32)((uint32)0U << 3U) /* even parity, otherwise odd */
| (uint32)((uint32)0U << 2U) /* enable parity */
| (uint32)((uint32)1U << 1U); /* asynchronous timing mode */
/** - transmission length */
sciREG->FORMAT = ((8U - 1U) | 0x70000U); /* length */
可是函数退出后,读取扫GCR1的bit10仍然为0,FORMAT的值仍然为7.这是为什么?
另外,规格书中没有介绍muti-buffer模式时,怎么读取RD寄存器,是否是在检测到RDY置位后,连续读取RD寄存器?
谢谢!