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.
- I have PS1 which has following functionalities PS1 / KWS1 / MOSI0 / (SCL0) / (TXD0) / (CPTXD0
- When the controller is up by default I would configure this pin to SPI0 (MOSI0).
- Based on some command I have to put this MAGNIV in low power mode so I would like to change the pin to GPIO and enable the interrupt.
- Once I get the wake up signal then I want the pin configured back to SPI0
As per my understanding
- By default “MODRR0” configures to SPI0.
- If I Enable the SPI0 module this pin will work as SPIO else it works as GPIO.
- So when ever I want to push MAGNIV in low power mode I would disable SPI0 so that PS1 can work as GPIO and enable the interrupt for wakeup.
- Once I get the wakeup signal on this ping I would initialize the SPI0 again, so that this pin works as MOSI0
Please advise me on this also let me know if any adverse impact of this.
Regards
Amol