- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On page 13 of BCM20732S Technical Reference Manual on page 13 it shows Pin 39 has having dual functionality.
I want to be able to use GPIO:28 alternate function LED1 from the description
How do I go about getting this to work?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works with the divide by 16 etc ... thanks!
This can be closed out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me re-phrase this ...
What simple call do I need to make to keep it powered ON when chip is powered ON?
I got it to blink etc .. .is there a "keep LED ON API"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use one of the GPIO API to always drive the GPIO that is connected to the LED instead of using the bleprofile API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a simple example of this or a document to reference?
I am using bleprofile_LEDOn and bleprofile_LEDBlink ... seems like the LEDOn function just blinks once
I would have thought that would keep on the LED on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
What I did to get it to work with the bleprofile LED functions was the following … but I am looking to find a way to keep the LED turned on.
How do I go about doing this? It is unclear.
1.
#include "platform.h" // LED
2.
Changed in BLE_PROFILE_CFG
/.status_led_enable =/ 1, // if 1 status LED is enable
3. Added PIN 28 as GPIO_SETTINGS_LED
BLE_PROFILE_GPIO_CFG glucose_monitor_gpio_config =
{
/.gpio_pin =/
{
1, 0, 3, 4, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
},
/.gpio_flag =/
{
GPIO_OUTPUT | GPIO_INIT_LOW | GPIO_WP,
GPIO_INPUT | GPIO_INIT_LOW | GPIO_BUTTON1 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON2 | GPIO_INT,
GPIO_INPUT | GPIO_INIT_HIGH | GPIO_BUTTON3 | GPIO_INT,
GPIO_SETTINGS_LED,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
//0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
};
4. In the timer … added some code to turn ON LED every seconds as a KEEP ALIVE type of blink. BUT what I want it to do is just stay illuminated when powered up for DEBUG purposes so I know chip is ON. But it just blinks …
if( (blebgm_apptimer_count % 5) == 0)
{
ble_traceprintf("*** BT ALIVE! *** \r\n");
bleprofile_LEDOn();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Assuming your LED is connected to P26 and is active low:
1. Don't set up P26 in your BLE_PROFILE_GPIO_CFG structure.
2. Drive P26 low when you want to turn it on.
#include "gpiodriver.h"
void application_create(void)
{
// all other application initialization
// Drive P26 low. If the LED is hooked up right, it will turn on
gpio_configurePin(26/16, 26%16, GPIO_OUTPUT_ENABLE, 0);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Should the led_enable on the field in BLE_PROFILE_CFG also be set to “0” or “1” ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set it to 0. You are basically controlling the LED yourself instead of letting the SDK do it for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So this does not work for me.
When I tried using the other mechanism where I setup GPIO 28 using the BLE_PROFILE_GPIO_CFG I do see the LED light up so I know that it is connected correctly.
The document has pin 39 and GPIO 28 for the LED. Is there some other special setting for the LED on this GPIO that I need to do with this function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So this does not work for me.
When I tried using the other mechanism where I setup GPIO 28 using the BLE_PROFILE_GPIO_CFG I do see the LED light up so I know that it is connected correctly.
The document has pin 39 and GPIO 28 for the LED. Is there some other special setting for the LED on this GPIO that I need to do with this function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, nothing special needs to be done for this LED to function. There was a typo in my message earlier that I corrected to gpio_configurePin(26/16, 26%16, GPIO_OUTPUT_ENABLE, 0); Since your LED is connected to P28, use 28 instead of 26.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works with the divide by 16 etc ... thanks!
This can be closed out.