2008-11-20 07:18:12 How do I mimic a 'button press' on a pf on the bf561 ezkit lite?
John Redford (UNITED KINGDOM)
Message: 65590
Hi, I have a device driver which monitors the programmable flags for interrupts. The 4 push buttons, pf5/6/7/8 all work as expected.
However, I would like to mimic a 'button press' on for example pf18 from my bare metal app running on core b. Eventually we will have actual buttons driving the pfs, but for now I just want to set the state manually.
I have tried the following:
*pFIO1_DIR = 0x0000;
*pFIO1_POLAR = 0x0000;
*pFIO1_INEN = 0xffff;
*pFIO1_FLAG_D = (1 << 2);
in my bare metal app, but the device driver running on core a doesn't recognise it.
Thanks in advance for any help,
John Redford.
QuoteReplyEditDelete
2008-11-20 07:45:14 Re: How do I mimic a 'button press' on a pf on the bf561 ezkit lite?
John Redford (UNITED KINGDOM)
Message: 65595
Sorry I was making a silly mistake - I have sorted out he problem now.
*pFIO_DIR = 0xffff; (needed to set the flags to outputs in order to generate software interrupts!)
Cheers.
QuoteReplyEditDelete
2008-11-20 09:30:46 Re: How do I mimic a 'button press' on a pf on the bf561 ezkit lite?
John Redford (UNITED KINGDOM)
Message: 65610
Actually that was not the solution - it does trigger interrupts, but incorrectly and they dont stop :/ I guess I shouldn't be using the *pFIO1_POLAR register when pfs are configured as outputs.
Please can someone shed some light on the initial problem that I stated?
Cheers,
John Redford.
QuoteReplyEditDelete
2008-11-20 21:24:50 Re: How do I mimic a 'button press' on a pf on the bf561 ezkit lite?
Mike Frysinger (UNITED STATES)
Message: 65642
where in the HRM do you see it saying that you can trigger a GPIO interrupt via software means only ? i dont see it anywhere.
QuoteReplyEditDelete
2008-11-21 05:29:26 Re: How do I mimic a 'button press' on a pf on the bf561 ezkit lite?
John Redford (UNITED KINGDOM)
Message: 65678
You're right it does not say that is possible. I think I was jumping to conclusions yet again. I will wait until we have the final board with the extra push buttons and cross that bridge then.
Thanks for the reply.
John Redford.