EmbeddedRelated.com
Forums
Memfault Beyond the Launch

WHERE'S ALL THE SMALL FOOTPRINT STUFF?

Started by "One...@bigpond.net.au [msp430]" November 4, 2014
My favourite MCu metric, uW/significant function.

Al

On 4/11/2014 8:26 PM, David Brown d...@westcontrol.com [msp430] wrote:
> On 04/11/14 10:31, l...@btinternet.com [msp430] wrote:
>>
>>
>> The PIC will have much lower power consumption than the Kinetis part.
>>
>> Leon
>>
> Perhaps, but it's not a given. The small Kinetis take very little power
> - and the Cortex M0+ cpu core does far more work per mW than a PIC core.
> So the Kinetis may have higher peak currents, but for the same job it
> will spend far more of its time in low-power sleep modes.
>
> Posted by: David Brown
>
>
>
>

Beginning Microcontrollers with the MSP430

On 4/11/2014 8:24 PM, David Brown d...@westcontrol.com [msp430] wrote:
> On 04/11/14 10:08, Onestone o...@bigpond.net.au [msp430] wrote:
>>
>>
>> I need too high a rate for dithering. I didn't know the tools were free,
>> I have old Kiel and IAR JTAG debuggers that I bought a few years ago,
>> that just might work.
> Such tools will probably work using "OpenOCD" - it supports most jtag
> debuggers, including ones you put together yourself from an FTDI chip.
> But it's probably easier to use a PE Micro debugger for $150, at least
> to start with - it's one less thing to worry about.
There's the rub, a major spinal cord injury in 2000, then a titanium
cage in my neck in 2007, a ruptured femoral aneurism in 2010, followed
by major post surgical infection, causing heart, liver and kidney
damage, then another aneurism event in 2011, leading to an ongoing blood
clotting issue, and just when things were coming back together in 2013 a
spider bite in my left ankle spread to my right leg, and went necrotic
in the bones of my foot, and my achilles. So no income whatsoever for 17
months, and $150 looks like Everest to a gnat. Hence I need to use what
is totally free, or already owned.
>
> The CodeWarrior tools for Kinetis were free to a size limit of 64K
> (IIRC), but the new KDS tools are entirely free and work on Linux and
> Windows.
I still plan to take a look, just because of the size issues, but time
is also an issue.
> Just as you use assembler macros to make assembly clearer (such as
> using names Bitset or Bitclr rather than the PIC's hopeless mnemonics),
Weirdly enough I used to use macros heaps, but with the advent of modern
IDE's I find it easier to simply cut and paste, and I've never had an
issue remembering mnemonics, even oddball stuff like BTFSC
> you can make functions in C with whatever name suits your purposes if
> you don't like "port |= 0x0001;" style. And while C (and C++) were not
> originally designed for embedded use, they have gradually changed over
> the years with embedded development in mind. At the same time, modern
> microcontroller cpu designs have had C (and C++) as their target. So
> cpus such as the Cortex M series were designed to be programmed in C.
> If you have ever worked with bigger processors, you will quickly see
> that it is assembly that feels like a "kludge", not C. You will also
> find that the "microcontroller" parts, such as manipulating bits in a
> register, take a smaller and smaller proportion of the program.
I've been writing in C since the early 80's probably, and used it on all
PC/workstation programs from the Microvax 2 in the mid 80's. Itried it
on microcontrollers, including the MSP430, but just go so frustrated
that some of the things I like to do in assembler just don't translate
into C, or don't translate easily, so I reverted to my favourite.
>> I guess I'm just as comfortable in assembler as anything else.
> That's fair enough.
>
> When I started my professional work around 20 years ago, most of my code
> was in assembler with only a little C. I made a number of msp430
> systems in assembler, before gcc was available. But while I
> occasionally fiddle around in assembler, and find it very useful to
> understand assembler on all the processors I use, it is rare that I
> write more than a few lines of assembly now. I don't miss it.
I get that, but to me the oft touted major benefit of C, or any other
high level language, is the separation from the hardware, and I don't
want to be separated. I think I can do a better job by directly managing
the hardware myself, but I understand that with modern highspeed micros
costing a few cents that there is little justification for most people
to write in assembler any more. This probably stems from originally
starting out in hardware in 1970 (as a hobby in 1962), with programming
usually done by stepping a series of instruction sinto memory using keys.

For me, where most of my designs are extremely tiny, I can't afford to
throw a part with 32k memory in a 40 pin package at a job, and things
like a full JTAG connector are usually bigger than my entire design, but
I'm guessing that there is a low pin count solution for the Kinetis,
otherwise it would make no sens.

Cheers

Al


Posted by: Onestone




On 04/11/14 18:49, Onestone o...@bigpond.net.au [msp430] wrote:
>
> On 4/11/2014 8:24 PM, David Brown d...@westcontrol.com [msp430] wrote:
> > On 04/11/14 10:08, Onestone o...@bigpond.net.au [msp430] wrote:
> >>
> >>
> >> I need too high a rate for dithering. I didn't know the tools were free,
> >> I have old Kiel and IAR JTAG debuggers that I bought a few years ago,
> >> that just might work.
> > Such tools will probably work using "OpenOCD" - it supports most jtag
> > debuggers, including ones you put together yourself from an FTDI chip.
> > But it's probably easier to use a PE Micro debugger for $150, at least
> > to start with - it's one less thing to worry about.
> There's the rub, a major spinal cord injury in 2000, then a titanium
> cage in my neck in 2007, a ruptured femoral aneurism in 2010, followed
> by major post surgical infection, causing heart, liver and kidney
> damage, then another aneurism event in 2011, leading to an ongoing blood
> clotting issue, and just when things were coming back together in 2013 a
> spider bite in my left ankle spread to my right leg, and went necrotic
> in the bones of my foot, and my achilles. So no income whatsoever for 17
> months, and $150 looks like Everest to a gnat. Hence I need to use what
> is totally free, or already owned.

I would think that after that lot, you'd be wanting to take things easy
for a while!

> >
> > The CodeWarrior tools for Kinetis were free to a size limit of 64K
> > (IIRC), but the new KDS tools are entirely free and work on Linux and
> > Windows.
> I still plan to take a look, just because of the size issues, but time
> is also an issue.
> > Just as you use assembler macros to make assembly clearer (such as
> > using names Bitset or Bitclr rather than the PIC's hopeless mnemonics),
> Weirdly enough I used to use macros heaps, but with the advent of modern
> IDE's I find it easier to simply cut and paste, and I've never had an
> issue remembering mnemonics, even oddball stuff like BTFSC

I don't find things like BTFSC hard to remember, I just find them hard
to read and write. When doing PIC assembly, I used a macro "IfSet" for
that instruction, and indented the next line with a tab - it made flow
control far clearer.

> > you can make functions in C with whatever name suits your purposes if
> > you don't like "port |= 0x0001;" style. And while C (and C++) were not
> > originally designed for embedded use, they have gradually changed over
> > the years with embedded development in mind. At the same time, modern
> > microcontroller cpu designs have had C (and C++) as their target. So
> > cpus such as the Cortex M series were designed to be programmed in C.
> > If you have ever worked with bigger processors, you will quickly see
> > that it is assembly that feels like a "kludge", not C. You will also
> > find that the "microcontroller" parts, such as manipulating bits in a
> > register, take a smaller and smaller proportion of the program.
> I've been writing in C since the early 80's probably, and used it on all
> PC/workstation programs from the Microvax 2 in the mid 80's. Itried it
> on microcontrollers, including the MSP430, but just go so frustrated
> that some of the things I like to do in assembler just don't translate
> into C, or don't translate easily, so I reverted to my favourite.
> >> I guess I'm just as comfortable in assembler as anything else.
> > That's fair enough.
> >
> > When I started my professional work around 20 years ago, most of my code
> > was in assembler with only a little C. I made a number of msp430
> > systems in assembler, before gcc was available. But while I
> > occasionally fiddle around in assembler, and find it very useful to
> > understand assembler on all the processors I use, it is rare that I
> > write more than a few lines of assembly now. I don't miss it.
> I get that, but to me the oft touted major benefit of C, or any other
> high level language, is the separation from the hardware, and I don't
> want to be separated. I think I can do a better job by directly managing
> the hardware myself, but I understand that with modern highspeed micros
> costing a few cents that there is little justification for most people
> to write in assembler any more. This probably stems from originally
> starting out in hardware in 1970 (as a hobby in 1962), with programming
> usually done by stepping a series of instruction sinto memory using keys.

I actually find that especially on bigger processors, the compiler
generates tighter object code than some of my assembly code would be.
It certainly has no problem making optimal code for things like hardware
register accesses - assuming you use appropriate C code, of course.

>
> For me, where most of my designs are extremely tiny, I can't afford to
> throw a part with 32k memory in a 40 pin package at a job, and things
> like a full JTAG connector are usually bigger than my entire design, but
> I'm guessing that there is a low pin count solution for the Kinetis,
> otherwise it would make no sens.
>
> Cheers
>
> Al
>

Posted by: David Brown




clotting issue, and just when things were coming back together in 2013 a
spider bite in my left ankle spread to my right leg, and went necrotic
in the bones of my foot, and my achilles. So no income whatsoever for 17
months, and $150 looks like Everest to a gnat. Hence I need to use what
is totally free, or already owned.

> I would think that after that lot, you'd be wanting to take things easy
> for a while!
Not really, I've spent too long on bed rest, unable to walk etc, plus
wuth no income whatsoever I need to pay the rent and put food on the
table, so, even if I didn't love what I do I'd not be able to rest. Good
job this is something I enjoy doing
> starting out in hardware in 1970 (as a hobby in 1962), with programming
> usually done by stepping a series of instruction sinto memory using keys.
> I actually find that especially on bigger processors, the compiler
> generates tighter object code than some of my assembly code would be.
> It certainly has no problem making optimal code for things like hardware
> register accesses - assuming you use appropriate C code, of course.
I haven't done a really large design for a while, my 11axis + GPS
tracking system is probably the biggest, but that runs happily on an
MSP430FR5949, my spinal cord stimulator is on a 2618 and that is mostly
for the I/O and large memory just to hold lots of tables.

Al


Posted by: Onestone





Memfault Beyond the Launch