Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
ATD and WAIT - amirkln - Dec 19 17:55:00 2005
Hello all,
I have some problems with the ATD.
I'm programming on the Metrowerks IDE, and I'm trying to input an
ATD input but something goes wrong...
If someone can give me the typical configuration for the registers it
would be great. Secondly, I would like to put the controller in a wait
mode in order to consume less power, when it does nothing.
How do I do so, and how do I return from the wait mode to the normal
mode. Thanks a bunch, Amir Klein.

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: ATD and WAIT - Doron Fael - Dec 20 2:58:00 2005
Amir,
Regarding your second question:
To start the WAIT mode you need the CPU needs to execute the WAI assembly
instruction.
Leaving WAIT power down, is done either using interrupt, or by issuing a
Reset. An interrupt resumes normal code execution after the interrupt
service routine is processed. A Reset initializes the CPU to the Reset
state - as Reset normally does.
Hope this helps,
Doron
Nohau
HC12 In-Circuit Emulators
www.nohau.com/emul12pc.html
At 21:55 19/12/2005 +0000, you wrote:
>Hello all,
>I have some problems with the ATD.
>I'm programming on the Metrowerks IDE, and I'm trying to input an
>ATD input but something goes wrong...
>If someone can give me the typical configuration for the registers it
>would be great. Secondly, I would like to put the controller in a wait
>mode in order to consume less power, when it does nothing.
>How do I do so, and how do I return from the wait mode to the normal
>mode. Thanks a bunch, Amir Klein.
[Non-text portions of this message have been removed]

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
XGATE Development tools - Jean-Sebastien Bouchard - Dec 20 10:42:00 2005
I need an environment/C-Compiler that will allow me to program the HCS12X
CPU and XGate.
I am looking for alternatives that are less expensive than Code Warrior 4.1.
Up until now, we have been using Hiwave/Panta to build code for our HCS12.
Thanks
Jean-Sebastien
[Non-text portions of this message have been removed]

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
RE: XGATE Development tools - Erich Styger - Dec 20 10:52:00 2005
There is a free special edition available from Freescale:
http://www.codewarrior.com/MW/Develop/Embedded/HC12/S12X.htm
This is the successor of what you have today.
Of course there are other options/vendors.
Erich
> -----Original Message-----
> From: 68HC12@68HC... [mailto:68HC12@68HC...]
> On Behalf Of Jean-Sebastien Bouchard
> Sent: Dienstag, 20. Dezember 2005 15:42
> To: 68HC12@68HC...
> Subject: [68HC12] XGATE Development tools
> I need an environment/C-Compiler that will allow me to
> program the HCS12X
> CPU and XGate.
>
> I am looking for alternatives that are less expensive than
> Code Warrior 4.1.
>
> Up until now, we have been using Hiwave/Panta to build code
> for our HCS12.
>
> Thanks
>
> Jean-Sebastien
>
>
> [Non-text portions of this message have been removed]
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Get Bzzzy! (real tools to help you find a job). Welcome to
> the Sweet Life.
> http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/dN_tlB/TM
> --------------------------------------------------------------
> ------~-
> Yahoo! Groups Links
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
RE: XGATE Development tools - Jean-Sebastien Bouchard - Dec 20 11:04:00 2005
I said I am looking for alternatives.
thanks
_____
From: 68HC12@68HC... [mailto:68HC12@68HC...] On Behalf Of
Erich Styger
Sent: December 20, 2005 9:53 AM
To: 68HC12@68HC...
Subject: RE: [68HC12] XGATE Development tools
There is a free special edition available from Freescale:
http://www.codewarrior.com/MW/Develop/Embedded/HC12/S12X.htm
This is the successor of what you have today.
Of course there are other options/vendors.
Erich
> -----Original Message-----
> From: 68HC12@68HC... [mailto:68HC12@68HC...]
> On Behalf Of Jean-Sebastien Bouchard
> Sent: Dienstag, 20. Dezember 2005 15:42
> To: 68HC12@68HC...
> Subject: [68HC12] XGATE Development tools
> I need an environment/C-Compiler that will allow me to
> program the HCS12X
> CPU and XGate.
>
> I am looking for alternatives that are less expensive than
> Code Warrior 4.1.
>
> Up until now, we have been using Hiwave/Panta to build code
> for our HCS12.
>
> Thanks
>
> Jean-Sebastien
>
>
> [Non-text portions of this message have been removed]
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Get Bzzzy! (real tools to help you find a job). Welcome to
> the Sweet Life.
> http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/dN_tlB/TM
> --------------------------------------------------------------
> ------~-
> > .
_____
[Non-text portions of this message have been removed]

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: XGATE Development tools - Jefferson Smith - Dec 20 20:12:00 2005
--- In 68HC12@68HC..., "Jean-Sebastien Bouchard"
<js.bouchard@m...> wrote:
>
> I said I am looking for alternatives.
>
> thanks
I know how that is :)
There is a small group I know, trying to make GCC work with XGate. The
initial idea is that S12X can be compiled using at least macros to do
extra X stuff. The problem so far is that a lot of stuff is too
complex, and getting XGate to work along with S12X would take a lot of
rewrite. There would be two gdb executables, one debugging the S12X
and the other debugging XGate concurrently.
Since it's so much work retargeting GCC to XGate (and much overkill),
one idea is to get an independent XGate assembler or simpler C
compiler working with some way to link this code so GCC can use it.
The small group is trying to work off of the GCC port discussed at:
http://groups.yahoo.com/group/gnu-m68hc11/
But they are only having private discussions on the XGate version at
the moment, I guess sort of brainstorming.
Comments on what direction they should be going, anybody?
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: Re: XGATE Development tools - Michal Konieczny - Dec 21 7:09:00 2005
> There is a small group I know, trying to make GCC work with XGate.
>
> [...]
>
> Comments on what direction they should be going, anybody?
My thoughts:
because gcc is not too well suited for 16-bit architectures with small
number of registers, maybe it's easier to retarget another compiler,
better suited for small micros, sdcc for example. Doing so, my
suggestion would be to stay compatible with gcc on the output side
(object and assembly files), to be able to reuse rest of the GNU
toolchain and not have yet another assembler, linker, etc.
In reality, I just don't know how feasible is that ...
--
Michal Konieczny
mk@mk@....

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: XGATE Development tools - Eric Engler - Dec 21 9:14:00 2005
--- In 68HC12@68HC..., Michal Konieczny <0xmk@c...> wrote:
> because gcc is not too well suited for 16-bit architectures with small
> number of registers, maybe it's easier to retarget another compiler,
> better suited for small micros, sdcc for example.
I heard they are looking at SDCC over gcc for this reason. But I don't
have any more info than that.

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: XGATE Development tools - Jefferson Smith - Dec 21 11:16:00 2005
--- In 68HC12@68HC..., "Eric Engler" <englere.geo@y...> wrote:
>
> --- In 68HC12@68HC..., Michal Konieczny <0xmk@c...> wrote:
>
> > because gcc is not too well suited for 16-bit architectures with
small
> > number of registers, maybe it's easier to retarget another compiler,
> > better suited for small micros, sdcc for example.
>
> I heard they are looking at SDCC over gcc for this reason. But I don't
> have any more info than that.
Anybody know about TCC (TinyC)? That's the next one in the list. Turns
out TinyC "supports the full complement of ISOC99", whereas SDCC does
not. Also a preliminary ruling says TCC has a better back-end to make
the port. One thing is that it would apparently be easier if TCC
emitted asm instead of code.

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: ATD and WAIT - formisemptiness - Jan 3 13:05:00 2006
Hi Amir,
Entering low power mode can be tricky. What you need to look out for
is the scenario where an interrupt happens right before the wait
instruction. In that scenario, the system handles the interrupt and
then goes into wait. This can be a serious problem if that interrupt
was meant to wake the system. Follow these steps to prevent that
scenario:
Firstly disable all interrupts:
asm SEI;
Then setup whatever it is you want to have wake you up (such as key
wakeup, SCI, RTI interrupts etc). If you are getting woken by the
timer or the RTI make sure the timer/RTI is setup to keep ticking in
wait mode.
Then execute these two commands in this order (without any commands in
between):
asm CLI; // enable interrupts
asm WAI; // enter wait mode
HC(S)12 will guarantee that the command after the CLI gets executed
before any interrupts happen, preventing the system from going into
wait if an interrupt comes right as you execte the CLI.
Entering stop mode is done in a near identical fashion. Instead of
asm WAI, use asm STOP. Just remember that all the conditions that
wake the CPU from wait will not wake it from stop (such as SCI).
Hope this helps,
Adi
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )