Discussion:
[EE] NXP/Freescale documentation
Sean Breheny
2017-12-13 15:19:43 UTC
Permalink
Hi all,

I would assume that some of you are using the ARM processors produced by
Freescale (now NXP) in their "Kinetis" line. I am working on a project
using the MK20DX256VLH7 which is an ARM Cortex M4 with 256KB flash and a
host of peripherals. It is a pretty amazing chip and my first venture into
ARM territory. I am using a Teensy 3.2 module, an Arduino-compatible
device, which contains this processor.

I'm very happy with the processor itself so far but the NXP/Freescale
documentation is horrible for this part. I feel the need to rant a bit and
see if my experience is common. I am used to the evil which lurks in the
Microchip datasheets (references to info found only in other documents
which only partially applies to your chip, specs which are never declared
valid but go straight from "preliminary" to "not recommended for new
designs", etc.) but I didn't expect to have similar problems with this
because I've had fairly good experiences with Freescale Power-PC-based
processor documentation.

The first problem I've had is that there doesn't seem to be any overall
guide to the manual, which is needed because it is 1400 pages long. It took
me a long time to realize that you not only had to enable peripherals but
you also have to enable the clock path to each peripheral, which is listed
under a section called "System Integration Module" and there is no warning
under, say, the ADC section that you need to enable its clock in the "SIM".
Not only that but you have to enable the clock FIRST and then the
peripheral's own enable.

The second problem is that signal names are mentioned in peripherals and
then never mentioned again anywhere in the entire 1400 page document, so
that you don't know what other internal signals those connect with. For
example, the ADC has both a hardware trigger ADHWT and "hardware trigger
channel selects" called ADHWTSn where n can be A or B on this chip. It
turns out that these connect to "pre-trigger" signals coming from the
Programmable Delay Block, but it never says that anywhere. I had to figure
it out from guessing and inference.

Thirdly, much of the wording is very vague. In one spot it says:

PDB channel's corresponding pre-trigger asserts when the counter reaches
the channel delay register *and* one peripheral clock cycle after a rising
edge is detected on selected trigger input source or software trigger is
selected and SETRIG is written with 1.

The asterisks around AND are mine. What they really mean here is OR,
because EITHER of the two conditions they specify can assert the
pre-trigger. (as an additional issue, SETRIG should really be SWTRIG)

They also use the term "ping-pong operation" to refer to what is usually
called "round robin". I've never heard of ping-pong ever including more
than two states.

These are only a few examples of the problems which made it take two days
for me to get hardware-triggered ADC working.

Anyone else have similar problems with this NXP/Freescale ARM documentation?

Sean
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
James Cameron
2017-12-13 20:30:44 UTC
Permalink
Yes, Sean, I've seen the same kind of documentation problems when
using MK20DX256 and the related processors to bring up C Forth.

However, I've been a documentation writer, had used Marvell ARM
documentation for a few years, and was very used to different styles.

By far the biggest annoyance when compared to PIC is that the imported
IP isn't documented by the vendor, so one has to go to ARM for that.

For large enough quantities, I'd engage with the vendor. That's what
we (at OLPC) did with Marvell and we got some good clarifications or
documentation updates out of it.

--
James Cameron
http://quozl.netrek.org/
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
s***@agilent.com
2017-12-13 21:50:42 UTC
Permalink
Engaging with the vendor... hmmm yes, that's the thing. That was Freescale and relatively recently became NXP. The support page is NXP but I can imagine the integration with Freescale systems is ... progressing .. even two years down the track? And of course now NXP is under attack from Qualcomm. And Qualcomm is under attack by Broadcom. Ugh!

With all the corporate argy-bargy, and inevitable rationalizations, I'm afraid that the knowledge base and willingness of support starts to wither.

Call me cynical :o(

Stephen



-----Original Message-----
From: piclist-***@mit.edu [mailto:piclist-***@mit.edu] On Behalf Of James Cameron
Sent: Thursday, 14 December 2017 7:31 AM
To: Microcontroller discussion list - Public. <***@mit.edu>
Subject: Re: [EE] NXP/Freescale documentation

Yes, Sean, I've seen the same kind of documentation problems when using MK20DX256 and the related processors to bring up C Forth.

However, I've been a documentation writer, had used Marvell ARM documentation for a few years, and was very used to different styles.

By far the biggest annoyance when compared to PIC is that the imported IP isn't documented by the vendor, so one has to go to ARM for that.

For large enough quantities, I'd engage with the vendor. That's what we (at OLPC) did with Marvell and we got some good clarifications or documentation updates out of it.

--
James Cameron
http://quozl.netrek.org/
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
John Gardner
2017-12-13 22:24:15 UTC
Permalink
...Call me cynical ...

It's publishing BS & leaving it out there for years that I enjoy...



On 12/13/17, ***@agilent.com <***@agilent.com> wrote:
> Engaging with the vendor... hmmm yes, that's the thing. That was Freescale
> and relatively recently became NXP. The support page is NXP but I can
> imagine the integration with Freescale systems is ... progressing .. even
> two years down the track? And of course now NXP is under attack from
> Qualcomm. And Qualcomm is under attack by Broadcom. Ugh!
>
> With all the corporate argy-bargy, and inevitable rationalizations, I'm
> afraid that the knowledge base and willingness of support starts to wither.
>
> Call me cynical :o(
>
> Stephen
>
>
>
> -----Original Message-----
> From: piclist-***@mit.edu [mailto:piclist-***@mit.edu] On Behalf Of
> James Cameron
> Sent: Thursday, 14 December 2017 7:31 AM
> To: Microcontroller discussion list - Public. <***@mit.edu>
> Subject: Re: [EE] NXP/Freescale documentation
>
> Yes, Sean, I've seen the same kind of documentation problems when using
> MK20DX256 and the related processors to bring up C Forth.
>
> However, I've been a documentation writer, had used Marvell ARM
> documentation for a few years, and was very used to different styles.
>
> By far the biggest annoyance when compared to PIC is that the imported IP
> isn't documented by the vendor, so one has to go to ARM for that.
>
> For large enough quantities, I'd engage with the vendor. That's what we (at
> OLPC) did with Marvell and we got some good clarifications or documentation
> updates out of it.
>
> --
> James Cameron
> http://quozl.netrek.org/
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change
> your membership options at http://mailman.mit.edu/mailman/listinfo/piclist
>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Sean Breheny
2017-12-14 17:03:56 UTC
Permalink
Thanks James and all those who responded. I will look to see if there is
any documentation available from ARM themselves. This is only a hobby
project so I have no leverage to get additional support from the
manufacturer.

On Dec 13, 2017 3:31 PM, "James Cameron" <***@laptop.org> wrote:

> Yes, Sean, I've seen the same kind of documentation problems when
> using MK20DX256 and the related processors to bring up C Forth.
>
> However, I've been a documentation writer, had used Marvell ARM
> documentation for a few years, and was very used to different styles.
>
> By far the biggest annoyance when compared to PIC is that the imported
> IP isn't documented by the vendor, so one has to go to ARM for that.
>
> For large enough quantities, I'd engage with the vendor. That's what
> we (at OLPC) did with Marvell and we got some good clarifications or
> documentation updates out of it.
>
> --
> James Cameron
> http://quozl.netrek.org/
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
a***@stfc.ac.uk
2017-12-14 17:25:27 UTC
Permalink
> Thanks James and all those who responded. I will look to see if there is any
> documentation available from ARM themselves. This is only a hobby project
> so I have no leverage to get additional support from the manufacturer.

Doesn't stop you informing the manufacturer that the documentation isn't worth the paper you could print it on ...



--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
James Cameron
2017-12-14 21:32:24 UTC
Permalink
Some hobby projects can be so publically visible that a manufacturer
will provide support anyway. ;-)

On Thu, Dec 14, 2017 at 12:03:56PM -0500, Sean Breheny wrote:
> Thanks James and all those who responded. I will look to see if there is
> any documentation available from ARM themselves. This is only a hobby
> project so I have no leverage to get additional support from the
> manufacturer.
>
> On Dec 13, 2017 3:31 PM, "James Cameron" <***@laptop.org> wrote:
>
> > Yes, Sean, I've seen the same kind of documentation problems when
> > using MK20DX256 and the related processors to bring up C Forth.
> >
> > However, I've been a documentation writer, had used Marvell ARM
> > documentation for a few years, and was very used to different styles.
> >
> > By far the biggest annoyance when compared to PIC is that the imported
> > IP isn't documented by the vendor, so one has to go to ARM for that.
> >
> > For large enough quantities, I'd engage with the vendor. That's what
> > we (at OLPC) did with Marvell and we got some good clarifications or
> > documentation updates out of it.
> >
> > --
> > James Cameron
> > http://quozl.netrek.org/
> > --
> > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> > View/change your membership options at
> > http://mailman.mit.edu/mailman/listinfo/piclist
> >
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist

--
James Cameron
http://quozl.netrek.org/
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Bob Blick
2017-12-14 23:17:37 UTC
Permalink
Does Freescale have an initialization code generator like stm32cubemx for ST's ARM parts? That can make your life a lot easier.

Bob

________________________________________
From: piclist-***@mit.edu <piclist-***@mit.edu> on behalf of Sean Breheny
Sent: Thursday, December 14, 2017 9:03 AM
To: Microcontroller discussion list - Public.
Subject: Re: [EE] NXP/Freescale documentation

Thanks James and all those who responded. I will look to see if there is
any documentation available from ARM themselves. This is only a hobby
project so I have no leverage to get additional support from the
manufacturer.

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
s***@agilent.com
2017-12-13 21:29:14 UTC
Permalink
Short answer - YES!
Using an MK10DN512... Similar issues with signal names etc. Had one beef with interrupts and precisely when the flags were set during boot-up. (We had an unexpected interrupt as the boot process was proceeding. The processor starts at Vdd = 1.7 V but connected H/W at ~ 2.7 V so a state change was detected. Even holding the reset didn't seem to fix it. Fortunately I am just the H/W guy - my F/W colleagues had to sort it...)

But yes - the documentation is a slog.
Stephen

p.s. NXP - I am still waiting for a response to the support ticket I raised - 10 days later...


-----Original Message-----
From: piclist-***@mit.edu [mailto:piclist-***@mit.edu] On Behalf Of Sean Breheny
Sent: Thursday, 14 December 2017 2:20 AM
To: Microcontroller discussion list - Public. <***@mit.edu>
Subject: [EE] NXP/Freescale documentation

Hi all,

I would assume that some of you are using the ARM processors produced by Freescale (now NXP) in their "Kinetis" line. I am working on a project using the MK20DX256VLH7 which is an ARM Cortex M4 with 256KB flash and a host of peripherals. It is a pretty amazing chip and my first venture into ARM territory. I am using a Teensy 3.2 module, an Arduino-compatible device, which contains this processor.

I'm very happy with the processor itself so far but the NXP/Freescale documentation is horrible for this part. I feel the need to rant a bit and see if my experience is common. I am used to the evil which lurks in the Microchip datasheets (references to info found only in other documents which only partially applies to your chip, specs which are never declared valid but go straight from "preliminary" to "not recommended for new designs", etc.) but I didn't expect to have similar problems with this because I've had fairly good experiences with Freescale Power-PC-based processor documentation.

The first problem I've had is that there doesn't seem to be any overall guide to the manual, which is needed because it is 1400 pages long. It took me a long time to realize that you not only had to enable peripherals but you also have to enable the clock path to each peripheral, which is listed under a section called "System Integration Module" and there is no warning under, say, the ADC section that you need to enable its clock in the "SIM".
Not only that but you have to enable the clock FIRST and then the peripheral's own enable.

The second problem is that signal names are mentioned in peripherals and then never mentioned again anywhere in the entire 1400 page document, so that you don't know what other internal signals those connect with. For example, the ADC has both a hardware trigger ADHWT and "hardware trigger channel selects" called ADHWTSn where n can be A or B on this chip. It turns out that these connect to "pre-trigger" signals coming from the Programmable Delay Block, but it never says that anywhere. I had to figure it out from guessing and inference.

Thirdly, much of the wording is very vague. In one spot it says:

PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register *and* one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1.

The asterisks around AND are mine. What they really mean here is OR, because EITHER of the two conditions they specify can assert the pre-trigger. (as an additional issue, SETRIG should really be SWTRIG)

They also use the term "ping-pong operation" to refer to what is usually called "round robin". I've never heard of ping-pong ever including more than two states.

These are only a few examples of the problems which made it take two days for me to get hardware-triggered ADC working.

Anyone else have similar problems with this NXP/Freescale ARM documentation?

Sean
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Neil
2017-12-15 00:09:27 UTC
Permalink
Sean,

Yes ... ish ... but... This lack of documentation seems to be the trend
nowadays, but I feel like it's because they want to push another route.

I've not tinkered with Freescale's ARM offerings yet, but I've looked
into them, as well as NXP's LPC line, Renesas, TI, and ST Micro for a
customer project.
The lack of clear path as to which documents to even read or which
software and tools I needed was stressful, and I reached out to these
companies' support to see what other nightmares I'd be in for if I did
need support later. I was asking for an interactive discussion with a
sales rep for product/tool selection.
ST first told me to put in a support ticket for this, but with some
pressing I found an FAE who spent 30 minutes on the phone with me and
gave me the road map. That was incredibly helpful and the answer was to
not deal with the little details myself, but to use their configuration
tool to handle that for me. For ST, that is called CubeMX. For Kinetis
processors I believe it's called Kinetis Expert Configurator. Atmel has
"START". And Microchip has Harmony for the PIC32 (maybe other lines too).

I ended up going with STM32 processors for that project and I have to
say that once I knew what was what, the toolchain and configuration
software was quite straight-forward to use. I can select which
peripherals I want to use (it shows it on a graphical representation of
the chip), configure and name other pins as inputs or outputs etc, then
I can configure those peripherals, such as selecting which pins have
pull-ups/downs, selecting baud rates for UARTs etc, and setting up the
clock sources/speeds. From there I'm mostly using library functions to
write my code, so the doc I mostly use is the library docs (called HAL
or Hardware Abstraction Layer docs). I feel like I'm not really coding
in C anymore as there are functions for even toggling I/O pins, but so
be it. If I needed to optimize something to the max, I probably need to
go into the ARM docs, but so far I haven't needed it.

I'm somewhat fine with them directing resources towards the
configurators and docs rather than the fine details, but a roadmap for
beginners would be incredibly helpful. I suspect larger companies can
actually get a support rep to hand-hold them at the start.
You should find the configurator for the Kinetis processors and try that
route.

While I'm here, I must add that I'm very frustrated by Microchip's
documenation, even for Harmony -- it's scattered, incomplete, buggy, and
doesn't match the software as the software seems to be hurriedly being
forced to grow up. But I do have a local FAE who's helped me sort a lot
of this out. I try not to bug him until I get really frustrated.

Cheers,
-Neil.


On 12/13/2017 10:19 AM, Sean Breheny wrote:
> Hi all,
>
> I would assume that some of you are using the ARM processors produced by
> Freescale (now NXP) in their "Kinetis" line. I am working on a project
> using the MK20DX256VLH7 which is an ARM Cortex M4 with 256KB flash and a
> host of peripherals. It is a pretty amazing chip and my first venture into
> ARM territory. I am using a Teensy 3.2 module, an Arduino-compatible
> device, which contains this processor.
>
> I'm very happy with the processor itself so far but the NXP/Freescale
> documentation is horrible for this part. I feel the need to rant a bit and
> see if my experience is common. I am used to the evil which lurks in the
> Microchip datasheets (references to info found only in other documents
> which only partially applies to your chip, specs which are never declared
> valid but go straight from "preliminary" to "not recommended for new
> designs", etc.) but I didn't expect to have similar problems with this
> because I've had fairly good experiences with Freescale Power-PC-based
> processor documentation.
>
> The first problem I've had is that there doesn't seem to be any overall
> guide to the manual, which is needed because it is 1400 pages long. It took
> me a long time to realize that you not only had to enable peripherals but
> you also have to enable the clock path to each peripheral, which is listed
> under a section called "System Integration Module" and there is no warning
> under, say, the ADC section that you need to enable its clock in the "SIM".
> Not only that but you have to enable the clock FIRST and then the
> peripheral's own enable.
>
> The second problem is that signal names are mentioned in peripherals and
> then never mentioned again anywhere in the entire 1400 page document, so
> that you don't know what other internal signals those connect with. For
> example, the ADC has both a hardware trigger ADHWT and "hardware trigger
> channel selects" called ADHWTSn where n can be A or B on this chip. It
> turns out that these connect to "pre-trigger" signals coming from the
> Programmable Delay Block, but it never says that anywhere. I had to figure
> it out from guessing and inference.
>
> Thirdly, much of the wording is very vague. In one spot it says:
>
> PDB channel's corresponding pre-trigger asserts when the counter reaches
> the channel delay register *and* one peripheral clock cycle after a rising
> edge is detected on selected trigger input source or software trigger is
> selected and SETRIG is written with 1.
>
> The asterisks around AND are mine. What they really mean here is OR,
> because EITHER of the two conditions they specify can assert the
> pre-trigger. (as an additional issue, SETRIG should really be SWTRIG)
>
> They also use the term "ping-pong operation" to refer to what is usually
> called "round robin". I've never heard of ping-pong ever including more
> than two states.
>
> These are only a few examples of the problems which made it take two days
> for me to get hardware-triggered ADC working.
>
> Anyone else have similar problems with this NXP/Freescale ARM documentation?
>
> Sean

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Loading...