I'm setting up a board support package for a board based on an MK22FN1M0. The BSP uses Processor Expert and automatically includes the peripheral memory map MK22F12.h version 1.6. The PSP, however, has no MK22F12.h and has no references at all to the MK22FN1M0. The BSP porting guide makes no mention of having to edit kinetis.h or psp_cpudef.h to add new processor types and I'm not even sure where it'd go in the PSP CPU table.
What's the proper way to set this up in the PSP? I've been told that the MK22FN1M0 is actually closer to the MK21FN1M0 than the MK22FN512 but I can find no documentation that calls out the differences.
Thanks,
Scott
Hi Scott:
PSP is a group of files that are specific to a CPU type. Please check check the below thread, it is about porting BSP and PSP from k20 to k10, I hope it helps.
I recommend you to read the following document to know the difference of Kinetis Products.
Kinetis ARM Cortex-M MCUs Product Selector|NXP
I listed the difference between MK21FN1M0AVC12 and MK22FN1M0VLH12 , you can check the reference manual for more details
MK21FN1M0AVMC12 | MK22FN1M0VLH12 | |
PIN COUNT | 121 | 64 |
package | MAPBGA | LQFP |
SDHC | 8 bit | -- |
Uart | 5 | 3 |
spi | 6 | 5 |
PWM | 1x8 | 2x8 |
ADC differential input | 4 | 2 |
ADC single input | 40 | 22 |
12 bit DAC | 2 | 1 |
Security and integrity modules | Hardware CRC Tamper detect and secure storage Hardware random number generator Hardware encryption 128 bit ID number per chip | Hardware CRC 128 bit ID number per chip |
GPIO | 81(79) | 40(38) |
Regards
Daniel
Also, on the subject of the product selector, I challenge you to find the MK02FN64VLF10 anywhere in that table. The part exists - I've got them on hand and I've designed them into a new product, but they're not listed anywhere except in a PDF.
I got it working after starting over. Part of the problem was that I accidentally chose a duplicate variant number when creating the PSP_CPU macro for the new variant in psp_cpudef.h. As far as I can tell the file isn't mentioned in any instructions and the entirety of the documentation for that file comes down to the statement "Processor and platform identifiers defined here" with no mention as to whether the ID numbers have any meaning. After discovering that the MK22FN1M0 is apparently considered a K21 sub-family part I'm taking nothing for granted.
I've seen references in the I/O map files to memory map major revision and minor revision numbers. Where can I find the memory map versions for each part? Are the version numbers consistent across parts or do they only refer to silicon revisions for a single part?
Likewise, are peripheral version numbers listed somewhere? Each of those parts has a 1500+ page reference manual and comparing them line by line, even if one knows which products to compare, is a daunting task. The HCS08 manuals would at least give consistent peripheral names and versions, e.g., "S08ACMPV2", "S08SPI16V1".
If another BSP for a similar 64-pin part exists and has the same pin assignments, and would therefore be a better starting point for the I/O init files, how would I know it? Is there a cross-reference somewhere for pin-compatible devices? The MK22FN512VLH12 appears, at a glance, to have an identical pin configuration to the MK22FN1M0AVLH12. Would that not be a better starting point for the I/O init? If it is, how is the user expected to know that the MK22FN1M0AVLH12 follows the MK21FN1M0 for core functions (and has no HSRUN or 48 MHz oscillator and has FTFE flash) but the MK22FN512 for pin assignments?
Even a list of applicable parts in the source files would be a good starting point. The memory map file in this case is MK22F12.h. The comments say "Peripheral memory map for MK22F12". Searching on the NXP site reveals zero hits for MK22F12. The shortened nomenclature doesn't seem to appear outside of the header files. Which parts are counted as MK22F12, and again, how would one know? The header file says it's based on reference manual K22P144M100SF5RM. Neither Google nor NXP's search function produce any hits for this document, except for that comment in the header file. As far as I can tell, no 100 MHz 144-pin K22 part exists. Both the file name and the comments refer to part and document numbers that exist nowhere else.
Scott