1
Discussion - EVE / Re: Touch register intermittently gets correct values
« on: May 03, 2022, 09:41:04 AM »
Hi all,
Issue has been resolved now, thanks for the info @Rudolf! This pointed me in the right direction!
It looks like something (can't work out what) was causing the Tag and Touch registers to be cleared if I did not read the value quick enough, so I ensured that the interrupt triggered a section of code to immediately read the registers and store them (was previously setting a flag and then dealing with it when available) and that resolved the issue.
Thanks for the help, this is a great community that always seems to have the answers!
Issue has been resolved now, thanks for the info @Rudolf! This pointed me in the right direction!
Well, the interrupt might have been delayed so the event already passed when the registers are read.
It looks like something (can't work out what) was causing the Tag and Touch registers to be cleared if I did not read the value quick enough, so I ensured that the interrupt triggered a section of code to immediately read the registers and store them (was previously setting a flag and then dealing with it when available) and that resolved the issue.
Thanks for the help, this is a great community that always seems to have the answers!