MCDOD's H8S214x page
Some bits and pieces that somebody might find useful.
First some 'features' (not all documented) that I fell over:
- You might, as I did, think that a sensible way to bring
up counters and suchlike would be to set up the control
registers and then enable them in the MSTP register to set
them going. I can't speak for every possible module but
certainly for some you can't access the control
registers until you enable the module in the MSTP.
-
Pin 4 (on the 2144 only?) is shown in the hardware manual
as 'VCC1' to be connected to Vcc. Actually it appears to be a
Flash Write Protect pin and the UFPB twiddles it, holding it
low (write protected) when it (the UFPB) is not writing flash.
Should you want to rewrite bits of the flash from a programme
running on the EVB (I store calibration constants in flash) you
need to do some surgery on the UFPB.
-
You find, if you have a reason to go looking, that it tells you
in the electrical specs that the absolute max Vin for the port input pins
is Vcc + 0.25V. Unfortunately the reverse voltage protection diode on
the EVB drops Vcc by 0.5V. So don't power your interface from the 5V
you feed the EVB with; a safe way might be to take Vcc from the EVB
(down the ribbon cables?).
MCDOD's H8S2144 bootload setup
It took me a lot of time to get a working bootload setup, so in case it saves
you reinventing it all this is the bootload setup that I use for my
H8S2144 boards.
The setup consists of a circuit which you feed from a serial port and which
(rather cunningly!) uses an incoming stream of NULLs from the host
to perform the hardware boot sequence. The software to drive this
is written for Linux, with a rather elementary UI - but it works.
The boot sequence is:
- Set the P9x and MD1 lines appropriately.
- Reset the MCU.
- When the MCU comes out of reset, wait for the next stop bit
and then pass on all RS232 activity to the MCU.
This circuit and source code are copyright R. M. Georgeson.
They are published under the terms of the GPL. Bug reports etc to
the email address in the README.
There is also the code for the microkernel and main kernel modified
from the source code published by Renesas. The modification is mainly
to make the main kernel much simpler by including all the functions
instead of having each function as an overlay loaded as needed with all
the attendant complications. Well there's plenty of RAM for it.
This code is a mess and could do with cleaning up. At the time I
was more concerned with getting something that worked and getting back
to the real business of programming the target controller.
Any Renesas copyright on the original code remains, my hacks are
copyright R.M. Georgeson only to the extent that there is no conflict with
pre-existing copyright.
You can download it here .