I'm studying the external interrupt processing.
It seems a "break" is missing at the end of "case pinLow:" line in McuPin voltChanged().
And It seems that pinLin's trigger condition is not correct. It only triggered at time 0?
And this fixes the mcs-51 extInt example doesn't run bug. (MCS-51.xml config file is correct).
It seems a "break" is missing at the end of "case pinLow:" line in McuPin voltChanged().
And It seems that pinLin's trigger condition is not correct. It only triggered at time 0?
- Code:
switch( m_extIntTrigger ) { // Trigger pinLow without pin change at simulation start
case pinLow: trigger = (Simulator::self()->circTime() == 0); raise = !newState;
case pinChange: trigger |= (oldState != newState); break;
case pinFalling: trigger = (oldState && !newState); break;
case pinRising: trigger = (!oldState && newState); break;
case pinDisabled: break;
}
And this fixes the mcs-51 extInt example doesn't run bug. (MCS-51.xml config file is correct).
- Attachments
- interrupt.zip
- You don't have permission to download attachments.
- (1 Kb) Downloaded 2 times