MC1321x problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC1321x problems

1,857 Views
Fabiano
Contributor I
I have a new NCB board wich I have the following problem: The BDM correctly sees the MCU and allows me to program the flash. When I program the flash with any of the SMAC applications using MC13213-NCB as target, BDM is ok and when I selec run, it says STARTIN, and then RUNNING.
But it seems to die in this loop
while (u8AttnIrq == FALSE) {
if (IRQFLAG == 1) { /* Check to see if IRQ is asserted */
u16IrqReg = SPIDrvRead(0x24); /*
* Clear MC13192 interrupts and
* check for ATTN IRQ from 13192
*/
u16IrqReg &= 0x400;
if (u16IrqReg == 0) {
u8AttnIrq = FALSE;
}
else {
u8AttnIrq = TRUE;
}
}
}

Any help?

I saw others messages, but I didnt solve my problem.

http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=3886#M3886
http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=5024&query.id=71468

Thanks,
Fabiano
Labels (1)
0 Kudos
4 Replies

502 Views
RickN
Contributor I
Hi,
 
  I might try one of the SMAC examples that use the Sensor Reference Boards (SRBs) just to verify that your development environment is working well.  Might be worth trying the latest version of BeeKit to generate your application.
 
   The code is reading the IRQ_Status register in the 1321x, and specifically waiting for the attn_irq bit to be set.   The manual says it is waiting for a power up complete condition before setting the attn_irq bit.  Are you running off of batteries?  Maybe they are old and the voltage is down.
 
Can you tell if IRQFLAG is set to a value of 1?  If not, you are stuck in the forever loop.
 
   Thanks,
 
   Rick
0 Kudos

502 Views
UC3MZigbeeGroup
Contributor I
Hi Fabiano,

I have a similar problem than yours, please, look at the description of my problem at:
http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=8876&jump=true#M887...


I would like to know how did you solve your problem? and how can I look at the value of IRQ_Status Register with the debugger?

Thanks in advance.

Rubén.
0 Kudos

502 Views
UC3MZigbeeGroup
Contributor I

I forgot comment that I have observed with the debugger (True-Time Simulator & Real-Time Debugger v6.1Build 6124) that while the application is running in the device, the clock sometimes changes to 16MHz, and sometimes to 8MHz and sometimes to 58KHz. I found a message with a similar problem in Freescale Forums (http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=6486&query.id=450311#M6486)but it didn't say how resolve the problem.

And some devices die in the loop of ICG_Setup function (in icg.c), see the picture attached for more details about it.

I would like somebody answer me these questions:

How can I look at the value of IRQ_Status Register with the debugger?

What reason can cause that the clock changes its frequency of this way?

Why do some devices die in the loop of ICG_Setup funciton?

Thanks in advance.
0 Kudos

502 Views
UC3MZigbeeGroup
Contributor I
I apologize cause I had problems to upload the attached file before. Now I upload it.

Best Regards.
0 Kudos