Hello Matthieu,
I understand your concern, sorry I was not being completely clear. The reason we provide application code is to give the customers a working solution that they can use as base for their development.
KW22D and KW21D are almost pin-to-pin compatible but the fact that there is a USB module available may or may not affect your implementation depending on your layout. That is why I shared our recommendation on the unused USB pins.
The line “SIM->SCGC5 |= SIM_SCGC5_PORTB_MASK | SIM_SCGC5_PORTC_MASK;” enables the clock gating for the PORT B and C which is needed to configure the MCU pins that are connected to the radio. You can refer to the Table 4-2. Internal Connections of the reference manual too see how the MCU is connected to the radio. You need these clocks enabled to configure the pins, otherwise a write to the PORT registers would result in a hard fault. I don’t see why not having this line could cause the overheat you are mentioning. I recommend you to compare your initialization code with one of our examples.
You can find the Linux version of the Connectivity Software in the Protocol Stacks section of the “SOFTWARE & TOOLS” tab from the KW2xD product page.
The connectivity test application is a simple application that provides an user interface through UART to perform basic transmission and reception tests of the radio. This application is based on the Simple Media Access Controller (SMAC) stack, which is a small codebase with some features of the 802.15.4 protocol.
You are right, you would need to adapt the source code to be compatible with your board, but it should not be a hard task. The application developed for the FRDM-KW24 flashes the LEDs in the board at the beginning of the application and uses the UART connected to pins PTE0 and PTE1 for the user interface. To disable the LEDs pins, you can set the gLEDSupported_d macro to FALSE in LED.h. If you share your schematics I could assist you with making this application compatible.
The application is located at “<ConnSw>\boards\frdmkw24\wireless_examples\smac\connectivity_test\”. You can follow the "SMAC Quick Start Guide.pdf" document in “<ConnSw>\docs\wireless\SMAC\” for steps on how to build and run this application.
About your third question, there is no errata for the KW2xD family.
Let me know if you have any issue in running the Connectivity Test application.
Regards,
Gerardo