Hi,
I was used as a example(Blinky) to check for input and output pins.
In Blinky example, I changed the input pin, output pin to another pin. it wasn't a problem.
if(GPIO_GetPinStatus(LED_PORT, SEOK_PIN)==1){
GPIO_SetActive( LED_PORT, LED_PIN);
}else if(GPIO_GetPinStatus(LED_PORT, SEOK_PIN)==0){
GPIO_SetInactive(LED_PORT, LED_PIN);
}
LED_PORT =GPIO_PORT_0
SEOK_PIN = GPIO_PIN_6
LED_PIN=GPIO_PIN7
I enters the input signal on P0_6, it was confirmed that the output signal appearing on P0_7.
At sps_device(DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps\sps_device), I enter the code above and no problem at build. But it didn't run.
in Disassembly
0x200013B2 BE00 BKPT 0X00
And at gpio.c, __asm("BKPT #0\n"); // this pin has not been previously reserved! --> It seems to be part of the problem.
I don't know why it is a problem. It does not build there a problem, why do I have a problem with running?
// I set pins like that in a periph_setup.c(at periph_init)
GPIO_ConfigurePin(LED_PORT, SEOK_PIN, INPUT, PID_GPIO, false);
GPIO_ConfigurePin(LED_PORT, LED_PIN, OUTPUT, PID_GPIO, false);
Hi songinsok,
In development debug mode in the ble projects you have to reserve your pins before using them. Just go to the periph_setup.c file and add your pins to the GPIO_Reservations() function.
Thanks MT_dialog
Thank you so much :)