Skip to content

Add the interrupt support to IP-408#1

Open
grasswang wants to merge 5 commits into
masterfrom
IP-408-interrupt-support
Open

Add the interrupt support to IP-408#1
grasswang wants to merge 5 commits into
masterfrom
IP-408-interrupt-support

Conversation

@grasswang

Copy link
Copy Markdown
Owner

Add the interrupt support to IP-408

@grasswang

Copy link
Copy Markdown
Owner Author

I did some tests; it looks like this IOC crash because the pulse is short. If I flipped the pulse then the IOC crashs if I setup the rising edge for interrupt. Turn on the neighboring channels crashes the IOC when there is a short positive pulse, but seem to be ok whem there is a short negative pulse (normally 5V, the 10 us pulse to 0V)

input 10us positive pulse, in ch1

====when ch1 is not setup for interrupt============
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x5,0x5) -- didn't crash;both channel next to channel 1 are COB, but ch1 is not set for interrupt
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x0,0x1) ----didn't crash; one of the channel next to channel 1 is set for falling edge
====crash ====================================
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x0,0x2) -- crash --(ch1 faliing)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x7,0x2) -- crash -- neighboring channels of ch1 are also setup for interrupt (ch1 COB)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x3,0x2) -- crash -- one neighboring channel of ch1 is setup for interrupt (ch1 COB)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x3,0x0) -- crash -- one neighboring channel of ch1 is setup for interrupt (ch1 rising)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x7,0x0) -- crash -- neighboring channels of ch1 are setup for interrupt (ch1 rising)
====works!!====================================
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x2,0x2) --Good --getting interrupt at channel1 for once each pulse, (ch1 COB)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x2,0) --Good --getting interrupt at channel1 for once each pulse, (ch1 rising)


input 10us negative pulse (normally 5V, goes to 0V for 10 us), in ch1

initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x5,0x5) -- didn't crash; both channels next to channel 1 are COB, but ch1 is not set for > interrupt
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x0,0x1) ----didn't crash; one of the channels next to channel 1 is set for falling edge
====crash ====================================
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x2,0) --crash-- (ch1 rising)
====works!!====================================
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x2,0x2) --Good -- getting interrupt at channel1 for once each pulse, (ch1 COB)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x0,0x2) --Good -- getting interrupt at channel1 for once each pulse, (ch1 falling)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x2,0x7) -- Good-- neighboring channels of ch1 are also setup for interrupt (ch1 COB)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x2,0x3) -- Good-- one neighboring channel of ch1 is setup for interrupt (ch1 COB)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x0,0x3) -- Good-- one neighboring channel of ch1 is setup for interrupt (ch1 falling)
initIpUnidig("Unidig1", 0, 0, 1, 0xd0,0x7,0x0) -- Good-- neighboring channels of ch1 are setup for interrupt (ch1 falling)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant