Hi,
I am using MAGNIV (9S12ZVCF0VKHR) series microcontroller.
I would like to know if I can change the functionality of a pin on the fly.
That is as described below.
As per my understanding
Please advise me on this also let me know if any adverse impact of this.
Regards
Amol
Hi Amol,
Yes, you are right with your understanding. If you enable the peripheral function it takes over the GPIO functionality. Be sure for GPIO wake-up to enable the pull-up resistor and interrupt.
Best Regards,
Stano.
Thanks for confirming,
couple of things.
1. Once the CPU wakes from low power mode ISR is not executed the instruction next to wait or stop is executed. that means I dont have to write the ISR for this.
2. Just curious what is the interrupt routine for PS1. I am new to this so dont know how do i define interrupt routine.
Hi Amol,
In case you want to use interrupt, you need set the Port Interrupt Enable register. Please see the whole Section 2.3.3 and concentrate to 2.3.3.5 to 2.3.3.7 and also on 2.4.4 to properly set interrupts. The look at Chapter 5 too about Interrupt module.
Best Regards,
Stano.