我有一个问题ing pin 0 port 0 beacuse I can not use it as an output
I'm using the ble_app_peripheral example and added the corresponding configuration
I've reserved the pin
RESERVE_GPIO(LED2, LED2_PORT, LED2_PIN, PID_GPIO); //Where LED2_PORT = GPIO_PORT_0 and LED2_PIN_0 = GPIO_PIN_0
Then configure it as an output
GPIO_ConfigurePin(LED2_PORT, LED2_PIN, OUTPUT, PID_GPIO, false);
And when trying to change the pin state nothing happens it remains off
I notice that is this pin specifically because when I change it to another pin (GPIO_PIN_9) it works, so maybe is there another configuration I'm mising?
I also know that this pin is also for reset so maybe I can't use it for this purpose?
I had no problem when working as peripheral only, it works fine, the problem comes in the bluetooth example, this pin is used as SPI and I removed this configuration
but a I think that this was not enough...
I can not use another pin because I'm using all of them for diferent purposes(which I have not configured yet, I'm focusing on this pin for the moment)
Hi magergar,
According to theDA14531 Module Datasheet, the P0_0 is used for the SPI MOSI and for the reset functionality.
Please note that P0_0/RST pin should not be driven while the TINYTM module boots from its internal
SPI FLASH. So, are you booting from Flash or from System-RAM?
>>this pin is used as SPI and I removed this configuration
Do you mean that you have remove the configuration from the user_periph_setup.h / .c ? Can you please attach the the user_periph_setup.h / .c files?
Thanks, PM_Dialog
Hi,
I Uploaded the user_periph_setup.h / .c where I Removed the SPI configuration
I also included the user_custs1_impl.c which is where I drive the port on and off
what I did was just turn on and off the port when I write the LED Characteristic in the service 1
I don't know where I'm booting from
I'm flashing the device in my custom pcb is this what you meant?
Found the problem, I needed to disable the hardware reset function so I could use it as GPIO
checking the example found this line
GPIO_Disable_HW_Reset();
on void periph_init(void) function once I added that there was no problem.
Hi magergar,
Thanks for your indication and glad that you solved it.
Thanks, PM_Dialog