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 Output
Routed by default and dedicated signals:
ADC0_SE6b (ADC0,SE,6b) - Single-ended channel 6b; Analog; Input; routed by default
Pin 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_InitLEDsPins
ERRORS:
#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