I'm making up a test circuit using the FRDM-K22F and I'm attaching it to an Arduino prototyping shield. I want to use processor pin 60 (which is used on the Freedom board as a SDHC port with the pin set to SPI0_SIN) as a GPIO but I can't figure out a way to force this change in MCUXpresso's Pin Tool.
I continually get the error "Incorrect assignment on 'Identifier' item." I also get the same issue with the RBG LED pins.
For some of the other previously defined pins, I can override them but not in these cases - when I look through, there seems to be a direct link to the Initialization routines that are atomatically provided in the built in SDK files.
Anybody know how I can override these pins or do I have to look for pins that I perform the functions I need (I also need an SDI chip select pin)?
Thanx!
Solved! Go to Solution.
Hi,
In the Overview label, there is a Function Group. You can see it at right. There are many little flag there. Click the little flag will include or exclude the function. If you don't want Board_InitLEDPins(), click the little flag ti exclude it.
Regards,
Jing
Okay that seemed to be the issue.
Thanx!
myke
Hi,
I reproduced this error on my side. It seems it just need to change the identifier to other name in Routed Pins window.
The build error shows that BOARD_SPI_PCS_PIN is used by spi_task.c. But this #define is covered by new pin_mux.c/.h
Regards,
Jing
Hi Jing,
Are you talking about the problem I'm having with setting the new pin name? If so, then yes I could see that as I noted above that by "banging on the pins, enabling them/disabling them/changing the Label & Identifier" to save the changes to the Label/Identifier but it doesn't work the first time.
What about the other issue where I can't set the pin functionality to what I want in the Pin Tool - this is Pin 62 specifically, in the example above, where I want to set it to SPI_SCK BUT it is already set as a Digital Output for the "BLUE_LED". This is the bigger issue for me.
Thanx,
myke
Hi,
In the Overview label, there is a Function Group. You can see it at right. There are many little flag there. Click the little flag will include or exclude the function. If you don't want Board_InitLEDPins(), click the little flag ti exclude it.
Regards,
Jing
As I move forwards, it seems like the best thing to do is to set the Pin Identifiers I want in the pin tool and make sure that I don't call any initialization routines (I do all the pin and peripheral initializations manually) and NOT let the generated files do that for me.
Does that sound correct?
Hi Myke,
Can you patch a screenshot of the config tool? I can't reproduce your problem.
Regards,
Jing
Hi Jing,
After changing pin 60 for the screenshot in the previous post, I now can't get teh pins to where they were before. When I try to set Pin 62 (Green LED on the FRDM-K22F) to SPI1_SCK, I keep getting an error that there is a conflict with BOARD_InitPins and when I hover over the pin, I get the error:
Pin No.: 62, ADC0_SE6b/PTD5/SPI0_PCS2/UART0_CTS_b/FTM0_CH5/FB_AD1/EWM_OUT_b/SPI1_SCK
ADC0 analog channel 6;General purpose IO, Port D, bit 5;SPI0 Peripheral Chip Select 2;Clear to send;Channel 5;FlexBus address/data bus 1;EWM output;SPI1 Serial Clock OutputRouted by default and dedicated signals:
ADC0_SE6b (ADC0,SE,6b) - Single-ended channel 6b; Analog; Input; routed by defaultPin is routed to signals:
PTD5 (GPIOD,GPIO,5) - General purpose IO pin 5; Digital; Input, Output; features: interrupt
SPI1_SCK (SPI1,SCK) - Serial clock; Digital; Input, Output; features: interrupt
Pin is routed in functions:
BOARD_InitPins; BOARD_InitLEDsPinsERRORS:
#62-SPI1.SCK setting in BOARD_InitPins:
– The identifier is duplicated in function(s) BOARD_InitLEDsPins. This can lead to duplicated #defines in the generated header file(s).
#62-GPIOD.GPIO.5 setting in BOARD_InitLEDsPins:
– The identifier is duplicated in function(s) BOARD_InitPins. This can lead to duplicated #defines in the generated header file(s).
AND, I can't get the build workign to were it was before - now I'm getting the build errors:
Description Resource Path Location Type
'BOARD_SPI_PCS_PIN' undeclared (first use in this function); did you mean 'BOARD_SPI_SIN_PIN'? SPI_task.c /FRDMK22F_Newhaven_01/source line 88 C/C++ Problem
'BOARD_SPI_PCS_PORT' undeclared (first use in this function); did you mean 'BOARD_SPI_SIN_PORT'? SPI_task.c /FRDMK22F_Newhaven_01/source line 87 C/C++ Problem
'BOARD_SPI_SCK_PIN' undeclared (first use in this function); did you mean 'BOARD_SPI_SIN_PIN'? SPI_task.c /FRDMK22F_Newhaven_01/source line 91 C/C++ Problem
'BOARD_SPI_SCK_PORT' undeclared (first use in this function); did you mean 'BOARD_SPI_SIN_PORT'? SPI_task.c /FRDMK22F_Newhaven_01/source line 90 C/C++ Problem
even though there aren't any problems with the pin tool.
Okay, I kept banging on the pins, enabling them/disabling them/changing the Label & Identifier and I got back to where I was.
I'm defining the SPI_SCK as a GPIO and I've commented out the call to BOARD_InitDEBUG_UARTPins and I'm manually setting up the pin registers and pin muxes myself.
I think I'm working again.
myke
Here is a cropped image of the the bottom of MCUXpresso where I amd attempting to change the pin to a DO and get the error:
I've also attached the full MCUXpresso screen.
This is MCUXpresso "MCUXpresso IDE v11.1.1 [Build 3241] [2020-03-02]" running under LInux (Ubuntu 18.04 LTS) with an MK22FN512xxx12 SDK version 2.7.0.
Thanx!
myke