I am trying to simulate a press-key interrupt for the FRDM-KL25Z board.
Everything seems to be set up. For example, I can access all the registers in the simulation mode. The only problem is that I am not sure how to simulate a real interrupt.
I know that PTD->PDIR (Port Data Input Register) is read-only. I tried to change its value with the use of its address in the memory, but that does not trigger an interrupt.
Currently, I simulate an interrupt on PORTD, e.g. as follows:
PTD->ISFR = 0x5; NVIC_SetPendingIRQ(PORTD_IRQn);
But I think there should be a way to set a register and have the interrupt triggered. Then the ISFR and the NVIC registers should be changed automatically. Right?
Any help is appreciated.