Other Parts Discussed in Thread: CONTROLSUITE
Hi,
In my code i use the default GPIOPinConfigure() function for setting up the gpio-pins on the master-subsystem of a concerto.
Configuring multiple pins of one GPIO-port lead to an non intended configuration of these pins.
My code does following function-calls:
GPIOPinConfigure(GPIO_PH2_SSI3CLK);
GPIOPinConfigure(GPIO_PH3_SSI3FSS);
GPIOPinConfigure (GPIO_PH4_SSI1CLK);
Before configuring SSI1CLK everything works fine, but after that my spi-connection with SSI3 doesn't work anymore.
With some debugging I found, that GPIOPinConfigure (GPIO_PH4_SSI1CLK) writes the wrong value to GPIO_PORTH_APSEL.
Manually writing the correct register value to GPIO_PORTH_APSEL makes everything work again.
I inspected the GPIOPinConfigure-function and maybe found the cause for this error:
line 1066 in driverlib/gpio.c:
HWREG(ulBase + GPIO_O_APSEL) &= ~1 << (ulShift>>2);
Doesn't this clear previously configured bits for the lower port-pins?
Doesn't it need to be like this?:
HWREG(ulBase + GPIO_O_APSEL) &= ~(1 << (ulShift>>2));
I'm using the default f28m35 MWare driverlib V130 from controlSUITE
cheers,
Felix