Config Pin Error Message Pins initialization requires the Port driver in the project

cancel
Showing results for 
Search instead for 
Did you mean: 

Config Pin Error Message Pins initialization requires the Port driver in the project

1,937 Views
markusaerni
Contributor I

Hello 

i am new to this tool.

I made a configuration for the MKE04z8 in MCUXpresso.

i write the source code in uVision.

I added the port SDK Driver to the Run Time Environment in uVision.

in MCUXpresso

How can i solve this error message ? 

Pins initialization requires the Port driver in the project

Thanks

0 Kudos
14 Replies

460 Views
Nhule
Contributor I

@marek-trmac you mentioned "under chapter 1.1 Start with an SDK example, e.g. first clone selected example and then create configuration for the example project."

 

I am getting a similar problem. I am working on RT1062 on a custom made board. Do I still need to follow this?

Pull existing similar example then create configuration?

0 Kudos

449 Views
marek-trmac
NXP Employee
NXP Employee

Hi Nhule,

generally I'd recommend this to all new users. In case you want to get familiar with new tool, start with some simple example, follow the documentation and try to experiment. This is good way how to understand how the tool works and how you can leverage.

Please mind, SDK examples are designed for EVK boards, so there might be needed some tweaks to run it on custom board.

Hope this answer your question.

Regards,
Marek
0 Kudos

1,029 Views
markusaerni
Contributor I

Hello
OK I did all the steps from the Quick start guide and the Getting Started with MCUXpresso SDK CMSIS Packs again.

Good news is i have no more error message.

Bad news is the BOARD_InitPins function from Pin_mux.c remains empty.

Update Project Code has no effect.

/***********************************************************************************************************************
* This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
* will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
**********************************************************************************************************************/

/* clang-format off */
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
product: Pins v4.0
processor: MKE04Z8xxx4
package_id: MKE04Z8VTG4
mcu_data: ksdk2_0
processor_version: 3.0.0
pin_labels:
- {pin_num: '1', pin_signal: PTA5/IRQ/TCLK1/RESET_b, label: Switch, identifier: Switch}
- {pin_num: '5', pin_signal: PTB7/I2C0_SCL/EXTAL, label: Reserve_1, identifier: Reserve_1}
- {pin_num: '6', pin_signal: PTB6/I2C0_SDA/XTAL, label: LED_RED, identifier: LED_RED}
- {pin_num: '7', pin_signal: PTB5/KBI1_P7/FTM2_CH5/SPI0_PCS0/ACMP1_OUT, label: LED_ORANGE, identifier: LED_ORANGE}
- {pin_num: '8', pin_signal: PTB4/KBI1_P6/FTM2_CH4/SPI0_MISO/ACMP1_IN2/NMI_b, label: LED_YELLOW, identifier: LED_YELLOW}
- {pin_num: '9', pin_signal: PTB3/KBI0_P7/SPI0_MOSI/FTM0_CH1/ADC0_SE7, label: Current_HE, identifier: Current_HE}
- {pin_num: '10', pin_signal: PTB2/KBI0_P6/SPI0_SCK/FTM0_CH0/ACMP0_IN0/ADC0_SE6, label: Heat_Charge, identifier: Heat_Charge}
- {pin_num: '11', pin_signal: PTB1/KBI0_P5/UART0_TX/SPI0_MISO/TCLK2/ADC0_SE5, label: ubat, identifier: UBat}
- {pin_num: '12', pin_signal: PTB0/KBI0_P4/UART0_RX/SPI0_PCS0/PWT_IN1/ADC0_SE4, label: State, identifier: State}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
/* clang-format on */

#include "fsl_common.h"
#include "pin_mux.h"

/* FUNCTION ************************************************************************************************************
*
* Function Name : BOARD_InitBootPins
* Description : Calls initialization functions.
*
* END ****************************************************************************************************************/
void BOARD_InitBootPins(void)
{
BOARD_InitPins();
}

/* clang-format off */
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitPins:
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
- pin_list:
- {pin_num: '1', peripheral: GPIOA, signal: 'GPIO, 5', pin_signal: PTA5/IRQ/TCLK1/RESET_b, direction: INPUT}
- {pin_num: '2', peripheral: CoreDebug, signal: SWD_DIO, pin_signal: PTA4/ACMP0_OUT/SWD_DIO}
- {pin_num: '5', peripheral: GPIOA, signal: 'GPIO, 15', pin_signal: PTB7/I2C0_SCL/EXTAL, direction: INPUT}
- {pin_num: '6', peripheral: GPIOA, signal: 'GPIO, 14', pin_signal: PTB6/I2C0_SDA/XTAL, direction: OUTPUT}
- {pin_num: '7', peripheral: GPIOA, signal: 'GPIO, 13', pin_signal: PTB5/KBI1_P7/FTM2_CH5/SPI0_PCS0/ACMP1_OUT, direction: OUTPUT}
- {pin_num: '8', peripheral: GPIOA, signal: 'GPIO, 12', pin_signal: PTB4/KBI1_P6/FTM2_CH4/SPI0_MISO/ACMP1_IN2/NMI_b, direction: OUTPUT}
- {pin_num: '9', peripheral: ADC, signal: 'SE, 7', pin_signal: PTB3/KBI0_P7/SPI0_MOSI/FTM0_CH1/ADC0_SE7}
- {pin_num: '10', peripheral: GPIOA, signal: 'GPIO, 10', pin_signal: PTB2/KBI0_P6/SPI0_SCK/FTM0_CH0/ACMP0_IN0/ADC0_SE6, direction: OUTPUT}
- {pin_num: '11', peripheral: ADC, signal: 'SE, 5', pin_signal: PTB1/KBI0_P5/UART0_TX/SPI0_MISO/TCLK2/ADC0_SE5}
- {pin_num: '12', peripheral: ADC, signal: 'SE, 4', pin_signal: PTB0/KBI0_P4/UART0_RX/SPI0_PCS0/PWT_IN1/ADC0_SE4}
- {pin_num: '16', peripheral: CoreDebug, signal: SWD_CLK, pin_signal: PTA0/KBI0_P0/FTM0_CH0/RTCO/ACMP0_IN2/ADC0_SE0/SWD_CLK}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
/* clang-format on */

/* FUNCTION ************************************************************************************************************
*
* Function Name : BOARD_InitPins
* Description : Configures pin routing and optionally pin electrical features.
*
* END ****************************************************************************************************************/
void BOARD_InitPins(void)
{
}
/***********************************************************************************************************************
* EOF
**********************************************************************************************************************/

0 Kudos

1,029 Views
marek-trmac
NXP Employee
NXP Employee

Hi Markus,

I believe this is correct. Pins selected in your configuration are routed by default, so not code needed to confire them.

Try to add FTM0, channel 0 and you should see the code:

void BOARD_InitPins(void)

{

   /* pin 22 is configured as FTM0_CH0 */

  PORT_SetPinSelect(kPORT_FTM0CH0, kPORT_FTM0_CH0_PTA0);

}

Please mind Pins tool V4 does not configure GPIO pin direction.

Regards

Marek

Regards,
Marek
0 Kudos

1,029 Views
marek-trmac
NXP Employee
NXP Employee

Markus,

recommended way how to start using Config Tools with MDK uVision project is described in Quick Start guide, located typically in : c:\nxp\MCUX_CFG_v4\doc\en\MCUXpressoConfigTools_Quick_Start_Guide.pdf

Follow steps described under chapter 1.1 Start with an SDK example, e.g. first clone selected example and then create configuration for the example project.

If you do any change in the tool, update source code using [Update Project Code] button, as described in chapter 3.

Regards

Marek

Regards,
Marek
0 Kudos

1,029 Views
markusaerni
Contributor I

hi

how can i send my file to you ?

Thanks

0 Kudos

1,029 Views
marek-trmac
NXP Employee
NXP Employee

Hi Markus,

it seems it is no longer supported upload of attachments to community. Can you upload your project to some public server and send link to the project to community?

Regards

Marek

Regards,
Marek
0 Kudos

1,029 Views
markusaerni
Contributor I

Hello 

The .mex file ?

<?xml version="1.0" encoding= "UTF-8" ?>
<configuration name="Blinky" version="1.3" xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/mex_configuration_1.3 http://mcuxpresso.nxp.com/XSD/mex_configuration_1.3.xsd" uuid="ea57f919-b7b7-42cf-be98-ace24140db38" xmlns="http://mcuxpresso.nxp.com/XSD/mex_configuration_1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<common>
<processor>MKE04Z8xxx4</processor>
<package>MKE04Z8VTG4</package>
<board></board>
<mcu_data>ksdk2_0</mcu_data>
<cores selected="core0">
<core name="Cortex-M0P" id="core0" description="M0P core"/>
</cores>
<description></description>
</common>
<preferences>
<validate_boot_init_only>false</validate_boot_init_only>
</preferences>
<tools>
<pins name="Pins" version="4.0" update_project_code="true">
<pins_profile>
<processor_version>3.0.0</processor_version>
<pin_labels>
<pin_label pin_num="1" pin_signal="PTA5/IRQ/TCLK1/RESET_b" label="Switch" identifier="Switch"/>
<pin_label pin_num="6" pin_signal="PTB6/I2C0_SDA/XTAL" label="LED_RED" identifier="LED_RED"/>
<pin_label pin_num="7" pin_signal="PTB5/KBI1_P7/FTM2_CH5/SPI0_PCS0/ACMP1_OUT" label="LED_ORANGE" identifier="LED_ORANGE"/>
<pin_label pin_num="8" pin_signal="PTB4/KBI1_P6/FTM2_CH4/SPI0_MISO/ACMP1_IN2/NMI_b" label="LED_YELLOW" identifier="LED_YELLOW"/>
<pin_label pin_num="9" pin_signal="PTB3/KBI0_P7/SPI0_MOSI/FTM0_CH1/ADC0_SE7" label="CURRENT_HE" identifier="CURRENT_HE"/>
<pin_label pin_num="10" pin_signal="PTB2/KBI0_P6/SPI0_SCK/FTM0_CH0/ACMP0_IN0/ADC0_SE6" label="HEAT_CHARGE" identifier="HEAT_CHARGE"/>
<pin_label pin_num="11" pin_signal="PTB1/KBI0_P5/UART0_TX/SPI0_MISO/TCLK2/ADC0_SE5" label="UBATT" identifier="UBATT"/>
<pin_label pin_num="12" pin_signal="PTB0/KBI0_P4/UART0_RX/SPI0_PCS0/PWT_IN1/ADC0_SE4" label="STATE" identifier="STATE"/>
<pin_label pin_num="13" pin_signal="PTA3/KBI0_P3/UART0_TX/I2C0_SCL" label="Reserve2" identifier="Reserve2"/>
<pin_label pin_num="5" pin_signal="PTB7/I2C0_SCL/EXTAL" label="Reserve1" identifier="Reserve1"/>
<pin_label pin_num="14" pin_signal="PTA2/KBI0_P2/UART0_RX/I2C0_SDA" label="Reserve3" identifier="Reserve3"/>
<pin_label pin_num="15" pin_signal="PTA1/KBI0_P1/FTM0_CH1/ACMP0_IN1/ADC0_SE1" label="Reserve4" identifier="Reserve4"/>
</pin_labels>
</pins_profile>
<functions_list>
<function name="BOARD_InitPins">
<description>Configures pin routing and optionally pin electrical features.&amp;lt;br/&amp;gt;</description>
<options>
<callFromInitBoot>false</callFromInitBoot>
<coreID>core0</coreID>
<enableClock>true</enableClock>
</options>
<dependencies>
<dependency resourceType="Peripheral" resourceId="ADC" description="Peripheral ADC is not initialized" problem_level="1" source="Pins: BOARD_InitPins">
<feature name="initialized" evaluation="">
<data>true</data>
</feature>
</dependency>
<dependency resourceType="Peripheral" resourceId="CoreDebug" description="Peripheral CoreDebug is not initialized" problem_level="1" source="Pins: BOARD_InitPins">
<feature name="initialized" evaluation="">
<data>true</data>
</feature>
</dependency>
<dependency resourceType="Peripheral" resourceId="GPIOA" description="Peripheral GPIOA is not initialized" problem_level="1" source="Pins: BOARD_InitPins">
<feature name="initialized" evaluation="">
<data>true</data>
</feature>
</dependency>
<dependency resourceType="SWComponent" resourceId="platform.drivers.common" description="Pins initialization requires the COMMON Driver in the project." problem_level="2" source="Pins.BOARD_InitPins">
<feature name="enabled" evaluation="equal" configuration="core0">
<data>true</data>
</feature>
</dependency>
<dependency resourceType="SWComponent" resourceId="platform.drivers.port" description="Pins initialization requires the PORT Driver in the project." problem_level="2" source="Pins.BOARD_InitPins">
<feature name="enabled" evaluation="equal" configuration="core0">
<data>true</data>
</feature>
</dependency>
</dependencies>
<pins>
<pin peripheral="CoreDebug" signal="SWD_DIO" pin_num="2" pin_signal="PTA4/ACMP0_OUT/SWD_DIO"/>
<pin peripheral="GPIOA" signal="GPIO, 15" pin_num="5" pin_signal="PTB7/I2C0_SCL/EXTAL">
<pin_features>
<pin_feature name="direction" value="INPUT"/>
</pin_features>
</pin>
<pin peripheral="GPIOA" signal="GPIO, 14" pin_num="6" pin_signal="PTB6/I2C0_SDA/XTAL">
<pin_features>
<pin_feature name="direction" value="OUTPUT"/>
</pin_features>
</pin>
<pin peripheral="GPIOA" signal="GPIO, 13" pin_num="7" pin_signal="PTB5/KBI1_P7/FTM2_CH5/SPI0_PCS0/ACMP1_OUT">
<pin_features>
<pin_feature name="direction" value="OUTPUT"/>
<pin_feature name="high_drive_enable" value="disable"/>
</pin_features>
</pin>
<pin peripheral="GPIOA" signal="GPIO, 12" pin_num="8" pin_signal="PTB4/KBI1_P6/FTM2_CH4/SPI0_MISO/ACMP1_IN2/NMI_b">
<pin_features>
<pin_feature name="direction" value="OUTPUT"/>
</pin_features>
</pin>
<pin peripheral="ADC" signal="SE, 7" pin_num="9" pin_signal="PTB3/KBI0_P7/SPI0_MOSI/FTM0_CH1/ADC0_SE7"/>
<pin peripheral="GPIOA" signal="GPIO, 10" pin_num="10" pin_signal="PTB2/KBI0_P6/SPI0_SCK/FTM0_CH0/ACMP0_IN0/ADC0_SE6">
<pin_features>
<pin_feature name="direction" value="OUTPUT"/>
</pin_features>
</pin>
<pin peripheral="ADC" signal="SE, 5" pin_num="11" pin_signal="PTB1/KBI0_P5/UART0_TX/SPI0_MISO/TCLK2/ADC0_SE5"/>
<pin peripheral="ADC" signal="SE, 4" pin_num="12" pin_signal="PTB0/KBI0_P4/UART0_RX/SPI0_PCS0/PWT_IN1/ADC0_SE4"/>
<pin peripheral="GPIOA" signal="GPIO, 3" pin_num="13" pin_signal="PTA3/KBI0_P3/UART0_TX/I2C0_SCL">
<pin_features>
<pin_feature name="direction" value="INPUT"/>
</pin_features>
</pin>
<pin peripheral="GPIOA" signal="GPIO, 2" pin_num="14" pin_signal="PTA2/KBI0_P2/UART0_RX/I2C0_SDA">
<pin_features>
<pin_feature name="direction" value="INPUT"/>
</pin_features>
</pin>
<pin peripheral="GPIOA" signal="GPIO, 1" pin_num="15" pin_signal="PTA1/KBI0_P1/FTM0_CH1/ACMP0_IN1/ADC0_SE1">
<pin_features>
<pin_feature name="direction" value="INPUT"/>
</pin_features>
</pin>
<pin peripheral="CoreDebug" signal="SWD_CLK" pin_num="16" pin_signal="PTA0/KBI0_P0/FTM0_CH0/RTCO/ACMP0_IN2/ADC0_SE0/SWD_CLK"/>
<pin peripheral="GPIOA" signal="GPIO, 5" pin_num="1" pin_signal="PTA5/IRQ/TCLK1/RESET_b"/>
</pins>
</function>
</functions_list>
</pins>
<clocks name="Clocks" version="4.0" update_project_code="true">
<clocks_profile>
<processor_version>3.0.0</processor_version>
</clocks_profile>
<clock_configurations>
<clock_configuration name="BOARD_BootClockRUN">
<description></description>
<options/>
<dependencies>
<dependency resourceType="SWComponent" resourceId="platform.drivers.common" description="Clocks initialization requires the COMMON Driver in the project." problem_level="2" source="Clocks.BOARD_BootClockRUN">
<feature name="enabled" evaluation="equal" configuration="core0">
<data>true</data>
</feature>
</dependency>
</dependencies>
<clock_sources>
<clock_source id="ICS.IRCLK.outFreq" value="37.5 kHz" locked="false" enabled="false"/>
</clock_sources>
<clock_outputs>
<clock_output id="Bus_clock.outFreq" value="24 MHz" locked="false" accuracy=""/>
<clock_output id="Core_clock.outFreq" value="24 MHz" locked="false" accuracy=""/>
<clock_output id="Flash_clock.outFreq" value="24 MHz" locked="false" accuracy=""/>
<clock_output id="ICSFF_clock.outFreq" value="37.5 kHz" locked="false" accuracy=""/>
<clock_output id="LPO_clock.outFreq" value="1 kHz" locked="false" accuracy=""/>
<clock_output id="Plat_clock.outFreq" value="24 MHz" locked="false" accuracy=""/>
<clock_output id="System_clock.outFreq" value="24 MHz" locked="false" accuracy=""/>
<clock_output id="Timer_clock.outFreq" value="24 MHz" locked="false" accuracy=""/>
</clock_outputs>
<clock_settings/>
<called_from_default_init>true</called_from_default_init>
</clock_configuration>
</clock_configurations>
</clocks>
<periphs name="Peripherals" version="1.0" update_project_code="true">
<peripherals_profile>
<processor_version>N/A</processor_version>
</peripherals_profile>
<functional_groups/>
<components/>
</periphs>
</tools>
</configuration>

Thanks

0 Kudos

1,029 Views
marek-trmac
NXP Employee
NXP Employee

Hi Markus,

to analyze problem with 'Update Project Code' I need complete project folder. If possible, send the project zipped.

Regards

Marek

Regards,
Marek
0 Kudos

1,029 Views
markusaerni
Contributor I

Hi

I tried update Project Code before but no change in the BOARD_InitPins function code.

 

If i deselect/select a Pin in the pin assignment the code in the setting for tool section (pin_mux.c) will be updated immediately but no change in the BOARD_InitPins function.

Thanks

0 Kudos

1,029 Views
marek-trmac
NXP Employee
NXP Employee

Hi Markus,

can you share your MDK project? It seems there is some problem with the project - it is not properly detected in the Config Tools.

Regards

Marek

Regards,
Marek
0 Kudos

1,029 Views
markusaerni
Contributor I

Hello 

I can build the application but the BOARD_Init_Pins function ist not complete i think.

* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitPins:
- options: {callFromInitBoot: 'false', coreID: core0, enableClock: 'true'}
- pin_list:
- {pin_num: '1', peripheral: GPIOA, signal: 'GPIO, 5', pin_signal: PTA5/IRQ/TCLK1/RESET_b, direction: INPUT}
- {pin_num: '2', peripheral: CoreDebug, signal: SWD_DIO, pin_signal: PTA4/ACMP0_OUT/SWD_DIO}
- {pin_num: '5', peripheral: GPIOA, signal: 'GPIO, 15', pin_signal: PTB7/I2C0_SCL/EXTAL, direction: INPUT}
- {pin_num: '6', peripheral: GPIOA, signal: 'GPIO, 14', pin_signal: PTB6/I2C0_SDA/XTAL, direction: OUTPUT}
- {pin_num: '7', peripheral: GPIOA, signal: 'GPIO, 13', pin_signal: PTB5/KBI1_P7/FTM2_CH5/SPI0_PCS0/ACMP1_OUT, direction: OUTPUT, high_drive_enable: enable}
- {pin_num: '8', peripheral: GPIOA, signal: 'GPIO, 12', pin_signal: PTB4/KBI1_P6/FTM2_CH4/SPI0_MISO/ACMP1_IN2/NMI_b, direction: OUTPUT}
- {pin_num: '9', peripheral: ADC, signal: 'SE, 7', pin_signal: PTB3/KBI0_P7/SPI0_MOSI/FTM0_CH1/ADC0_SE7}
- {pin_num: '10', peripheral: GPIOA, signal: 'GPIO, 10', pin_signal: PTB2/KBI0_P6/SPI0_SCK/FTM0_CH0/ACMP0_IN0/ADC0_SE6, direction: OUTPUT}
- {pin_num: '11', peripheral: ADC, signal: 'SE, 5', pin_signal: PTB1/KBI0_P5/UART0_TX/SPI0_MISO/TCLK2/ADC0_SE5}
- {pin_num: '12', peripheral: ADC, signal: 'SE, 4', pin_signal: PTB0/KBI0_P4/UART0_RX/SPI0_PCS0/PWT_IN1/ADC0_SE4}
- {pin_num: '13', peripheral: GPIOA, signal: 'GPIO, 3', pin_signal: PTA3/KBI0_P3/UART0_TX/I2C0_SCL, direction: INPUT}
- {pin_num: '14', peripheral: GPIOA, signal: 'GPIO, 2', pin_signal: PTA2/KBI0_P2/UART0_RX/I2C0_SDA, direction: INPUT}
- {pin_num: '15', peripheral: GPIOA, signal: 'GPIO, 1', pin_signal: PTA1/KBI0_P1/FTM0_CH1/ACMP0_IN1/ADC0_SE1, direction: INPUT}
- {pin_num: '16', peripheral: CoreDebug, signal: SWD_CLK, pin_signal: PTA0/KBI0_P0/FTM0_CH0/RTCO/ACMP0_IN2/ADC0_SE0/SWD_CLK}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
/* clang-format on */

/* FUNCTION ************************************************************************************************************
*
* Function Name : BOARD_InitPins
* Description : Configures pin routing and optionally pin electrical features.
*
* END ****************************************************************************************************************/
void BOARD_InitPins(void)
{
/* High Current Drive Capability of PTB5: 0x01u */
PORT_SetHighDriveEnable(PORT, kPORT_HighDrive_PTB5, 1);
}

Thanks

0 Kudos

1,029 Views
marek-trmac
NXP Employee
NXP Employee

Hi Markus,

hit 'Update Project Code' button (from toolbar) to update pin_mux.c in the project.

Regards

Marek

Regards,
Marek
0 Kudos

1,029 Views
marek-trmac
NXP Employee
NXP Employee

Hi Markus,

it sounds that SDK port driver was not detected in MDK uVision project even you have added it. Can you share your project?

If you build the application, are there any compilation problems? If no, you can simly ignore the error message.

Regards

Marek

Regards,
Marek
0 Kudos