[Oberon] FPGA-related Project Oberon Customizations
Chris Burrows
chris at cfbsoftware.com
Thu Feb 18 13:11:16 CET 2016
> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> eas lab
> Sent: Thursday, 18 February 2016 9:51 PM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] FPGA-related Project Oberon Customizations
>
> How much of your I2C source can be easily ported to X86 & ARM ?
> It would be nice if the top-level was common, and only the bottom-
> level was specific to different CPU families.
> I'd like to test & use I2C on both x86 & ARM.
>
It is already running on NXP ARM-Cortex-M3 devices. The top-level simple
device-specific examples (temperature sensor, accelerometer etc.) are
generic and should be fairly easy to port to other Oberon-07 systems. There
is example source code for ARM Cortex-M3 microcontrollers on the Astrobe
Forum e.g.:
"Read a Freescale MMA7455 Accelerometer using I2C"
http://www.astrobe.com/forum/viewtopic.php?f=9&t=191
"Measure temperature with a TI TMP102 using I2C"
http://www.astrobe.com/forum/viewtopic.php?f=9&t=202
The bottom-level I2C module which includes procedures I2C.Init,
I2C.ReadBytes, I2C.WriteBytes etc. is specific to microcontroller-families
rather than CPU families. It is about 350 lines of code, about 20 lines of
which vary for each of the NXP microcontroller-families (LPC176x, LPC178x
etc.).
About 25% would probably need to be rewritten to port to a different
manufacturer's microcontrollers (e.g. STM).
Regards,
Chris Burrows
CFB Software
http://www.astrobe.com
More information about the Oberon
mailing list