Hello
I have the problem that on my NETDCU8 my interupt on J5 Pin 2 is always level triggered, not edge triggered, doesn´t matter what registry configuration I use.
I connected this pin 2 to 3.3V with a 4.7k resistor to have fixed voltage but I get interupts as long as i put low signal on that pin 2.
My registry settings is as follows:
Code
- reg open \drivers\builtin\digitalio
- reg set value port dword 0
- reg set value index dword 0
- reg set value datadir dword 0x000f1f
- reg set value datainit dword 0x000000
- reg set value useasio dword 0xffffff
- reg set value IRQCfg0 dword 0x000000E0
- reg set value IRQCfg1 dword 0x00000000
- reg set value IRQCfg2 dword 0x00000000
The code is on principle:
Code
- DWORD dwIRQ = 7; // Port 0 pin 2
- if(!DeviceIoControl(m_hDIO, IOCTL_DIO_REQUEST_SYSINTR, &dwIRQ, sizeof(DWORD), &m_dwSysIntr_Pin2, sizeof(DWORD), NULL, NULL ) )
- {
- err=GetLastError();
- MessageBox(NULL,TEXT("J5 pin 2 DeviceIoControl failed"),TEXT("Debug"),MB_OK | MB_SETFOREGROUND);
- }
- if(!InterruptInitialize(m_dwSysIntr_Pin2,m_hIsrEvent_J5_Pin2,NULL,0))
- {
- MessageBox(NULL,TEXT("J5 pin 2 InterruptInitialize failed"),TEXT("Debug"),MB_OK | MB_SETFOREGROUND);
- }
- InterruptDone(m_dwSysIntr_Pin2);
- while (true)
- {
- DWORD CDIO::WaitISR_J5_Pin2(void)
- {
- DWORD dwReturn=WaitForSingleObject(m_hIsrEvent_J5_Pin2,500);
- InterruptDone(m_dwSysIntr_Pin2);
- return dwReturn;
- }
- }
The strangest thing is that when I use
what would mean that no interupts should be generated, even then the interupt are coming all the time when I connected ground to the pin.
Does anyone have an idea what I do wrong?
Any ideas are welcome, thanks.
bye
Andreas