[En-Nut-Discussion] Ethernut on TI's Cortex-M3 (Stellaris LM3S...)
phip at hb9etc.ch
Mon Oct 8 23:16:31 CEST 2012
Hi Ole, Uwe, everyone,
On 10/08/2012 12:08 PM, Ole Reinhardt wrote:
> Unfortunately there was not much effort spent yet to support the LM3s
> series yet. So there is only a configuration file and a linker script
> In general the kernel will start up on the LM3S, but only the kernel.
> Any device driver have to be written from scratch.
> I just though about doing this, but currently I could do this only as a
> commercial project, as my spare time is limited.
>> I suppose I'd need some assistance
>> for the latter option, as I've never done this before.
> I'd be happy to give you any assistance, wherever you need. I have two
> LM3S boards here, so I can also help you with debugging.
I've now started to update the directory structure and the headers.
Please find attached the Git bundle containing the changesets which I've
made so far. I still need to get used to using Git, so never mind if a
changeset may look weird or misses a file. My working copy is clean now,
so at least the last changeset should include everything.
I'd greatly appreciate if someone could have a look at it and tell me if
it is basically correct what I'm doing. And if it adheres to the
Ethernut standards (if there are any).
And them something specifically @Ole:
Most parts of the headers are fairly self-explaining, but two locations
confused me so far. Both are related to the clocking. The first one is
the _clk.h (e.g. stm32_clk.h in nut/include/arch/cm3/stm):
/* STM32F Clock source selectors */
#define SYSCLK_HSI 0
#define SYSCLK_PLL 1
#define SYSCLK_HSE 2
#define PLLCLK_HSI 3
#define PLLCLK_HSE 4
What are these numbers for? Are they something STM32-related, or should
these be present on all Cortex-M3? The other looks similar and is in
#define NUT_HWCLK_EMC 2
* Clock for USB
#define NUT_HWCLK_USB 3
* Clock for WDT
#define NUT_HWCLK_WDT 4
... and so on
Again, what do these numbers stand for? This time it can't be specific
to one single Cortex-M3 architecture, as it is in a generic file and the
same defines are present for different families.
Generally: How is the clocking handled in Ethernut? Is there a document
explaining this? I'd expect something like SetClock() to which I'd pass
some params to define how the device is clocked, but this seems to be
Thanks for your support,
More information about the En-Nut-Discussion