i don't have a problem at building, but it doesn't running....

3 posts / 0 new
Last post
songinsok
Offline
Last seen:5 years 2 weeks ago
加入:2015-11-02 05:28
i don't have a problem at building, but it doesn't running....

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);

Device:
MT_dialog
Offline
Last seen:1 week 4 days ago
Staff
加入:2015-06-08 11:34
Hi songinsok,

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

songinsok
Offline
Last seen:5 years 2 weeks ago
加入:2015-11-02 05:28
Thank you so much :)

Thank you so much :)

Topic locked