HI
I am using MSP430F5 series MCU .
I have myTimer A0 running to count 2ms and perform a task every 2 ms .
Now when I port map pins P2.2 , P2.3 , P2.4 to UCB0 , immediately my timer stops functioning and the system almost stands still .
I cannot understand what happens , but the system looks to be hung or reset ..
My questions are
1. Is there any conflict with this port map with the timer
2. Is there any problem with the port mapping code (please scroll down for the code )
3. Is it mandatory to code the ISR for UCB0 ?
4. Is there any way to find whether my MCU got reset ?
Below is my port mapping code.
__disable_interrupt();
PMAPPWD = 0x02D52;
#ifdef PORT_MAP_RECFG
PMAPCTL = PMAPRECFG;
#endif
P2MAP1 = PM_UCB0SIMO;
P2MAP2 = PM_UCB0SOMI;
P2MAP3 = PM_UCB0CLK;
PMAPPWD = 0;
#ifdef
PORT_MAP_EINT
__enable_interrupt();
Thanks in advance ..
Jenitta
Hi Jenitta,
Yes, if you enable the individual interrupt bit in a peripheral and then set the general interrupt with __enable_interrupt(), the MCU will try to fetch from the interrupt vector supposed to contain the ISR. If you don't have that ISR, then this will be undefined (actually if you've erased the ISR then 0xFFFF will be fetched which I believe causes the device to halt, but I'm likely wrong).
Tony
Jenitta Rex3. Is it mandatory to code the ISR for UCB0 ?
Jenitta Rex4. Is there any way to find whether my MCU got reset ?
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.