standalone operation

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

standalone operation

3,137 Views
EagleBeak
Contributor I
I've been running a prototype MC9S12E128 via a Nohau emulator but when I program the code into the chip, it does appear to operate at all on power up. I am using the P&E Micro USB Multilink to program the chip and have verified the reset vector at FFFFE and the main code at FC000.
 
I have checked the reset line and the clock inputs which appear to be ok. Does anyone have suggestions for what else I could look for?
 
Thanks
Eagle Beak
Labels (1)
0 Kudos
Reply
3 Replies

1,725 Views
mke_et
Contributor IV
Have you tried to single step?

I'm assuming that the prototype is a known good design, right? So you know it works.

If this is your own design, are you sure the PLL is starting up? I had some PLL and crystal problems with one of my designs, and it just wouldn't start. I went back and redid the PLL filter design, then changed my crystal configuration and haven't had a sniff of problems (at least in that area) ever since.

Mike
0 Kudos
Reply

1,725 Views
EagleBeak
Contributor I
The hardware was done by a different division in another city. I have had it going under the emulator, which has quite a different clock setup than this board's but it is the same design used across the board on our B32 products. This is an E128. It just doesn't jump to the start up vector so I know there's no register setting issues because it doesn't get that far.
 
The reset circuit could use some work but I used the P&E USB Multilink to program the chip, and that program will issue a reset to chip of 6mS, which should cause it to see a hard reset. 
 
Good suggestions though. I will look further into the clock circuit. Is there an issue if the clock doesn't become stable within a set period of time?
 
Thanks,
Eagle Beak
0 Kudos
Reply

1,725 Views
EagleBeak
Contributor I
It turns out that the PLL was part of the problem, it was enabled for the sake of the emulator but the standalone target uses a crystal.
 
Secondly, I had programmed the MISC register incorrectly. My intention was to program the write once registers at startup so that a program bug doesn't accidently hit them. The documentation was a little confusing in the data sheet as the contents of the MISC are an extension of INITEE register. The bit field descriptions table for the MISC register is labeled 'INITEE Field Descriptions'. In my haste and lack of understanding I put  zero in the MISC register which disabled the FLASH EEPROM from the memory map. The emulator uses it's own RAM to simulate program space so the setting has no effect.
 
Summary:
 
1. PLL bit was enabled when the circuit uses a crystal. The problem was resolved by clearing  the PLLSEL bit in the CLKSEL register in the start up code.
 
2. The FLASH EEPROM was disabled from the memory map. The was resolved by setting the ROMON bit in the MISC register.
 
E. Beak
 
 
0 Kudos
Reply