I'm testing 8051‘s UART.
I found that in I51Usart::configureA()
m_mode is inited to 0xFF in UsartModule's constructor. So it works in the first simulation. But I51's UART will NEVER get configured ( and sender enabled) in later simulations, since m_mode is already set to 1 and will always equal to mode. I'm not sure if only 8051 have this problem.
I found that in I51Usart::configureA()
- Code:
void I51Usart::configureA( uint8_t val ) //SCON
{
uint8_t mode = val >> 6;
if( mode == m_mode ) return;
m_mode = mode;
m_sender->enable( true );
m_mode is inited to 0xFF in UsartModule's constructor. So it works in the first simulation. But I51's UART will NEVER get configured ( and sender enabled) in later simulations, since m_mode is already set to 1 and will always equal to mode. I'm not sure if only 8051 have this problem.
Last edited by royqh1979 on Wed Oct 04, 2023 8:58 am; edited 2 times in total