Tool/software: Code Composer Studio
Hello,
I am using the GPIO.h driver to try and set, toggle some pins on the CC1352P1. I have the pins connected to an oscilloscope to see what happens there.
I am able to write to and toggle the user LEDs (Board_PIN_LED0, Board_PIN_LED1) just using the GPIO_write() function, and toggle them using the GPIO_toggle() function.
However, when I try the same for another digital GPIO pin, say Board_DIO12 (CC1352P1_LAUNCHXL_DIO12), I am unable to see the pin level change on the oscilloscope.
I am connecting my oscilloscope to DIO12 on my CC1352P1-Launchpad.
Here's my code to write to the pin :
/* Call driver init functions */
GPIO_init();
/* Configure the LED and button pins */
GPIO_setConfig(CC1352P1_LAUNCHXL_DIO12, GPIO_CFG_OUT_STD| GPIO_CFG_OUT_LOW);
/* Turn on user LED */
while(1){
if(GPIO_read(CC1352P1_LAUNCHXL_DIO12)==0)
GPIO_write(CC1352P1_LAUNCHXL_DIO12, ~0);
else
GPIO_write(CC1352P1_LAUNCHXL_DIO12, 0);
sleep(1);
}
I am unable to see the level of this pin change on the oscilloscope. Moreover, GPIO_read() always reads the value back from this pin as 0.
I tried the same with CC1352P1_LAUNCHXL_SPI0_CSN, which is the chip select for the SPI0 module, and I did not see the level of that pin change on the oscilloscope either, but in the code, for my 'toggle' function, I can see that GPIO_read(CC1352P1_LAUNCHXL_SPI0_CSN) returns a 0 and a 1 alternatively. I connect my oscilloscope to the pin DIO11 for this test.
Please advise.
Warm regards,
Samyukta