hardware difference in GPIO pins

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8帖子/ 0
Last post
nigelyang
Offline
Last seen:2 months 2 days ago
Joined:2018-03-20 08:24
hardware difference in GPIO pins

Hi Dialog,

Q1 I try to use P2_0 and P2_1 (I do not use 32K xtal) as Button use. I found the two different current consumption results when I config P2_0 and P2_1 as button respectively.
using P2_0 as button, I got 3 uA at hibernation mode; However,using P2_1 as button, got 15 uA at hibernation mode. I config the same thing in P2_0 and P2_1(using macro
AD_GPIO_INTR_INSTANCE(.........)). Is there any hardware difference between the two pins? moreover, SWDIO and SWCLK have same result(power consumption of SWCLK is higher than
SWDIO ).

Q2. What's difference between system using 32K xtal and internal RC 32K for LP_CLK ? different power consumption? 

Q3. is it possible to share QSPI pins(P00~P05) to be GPIO for controlling external devices without affecting the flash code executing?

thanks for your help.

Device:
PM_Dialog
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi nigelyang,

Hi nigelyang,

Q1 : The P2_0 and P2_1 are GPIO but they can be multiplexed with the XTAL. Where did you find the AD_GPIO_INTR_INSTANCE macro?Also, Please try to describe what you are trying to accomplish.

Q2: The RCX is an easy way to have a low power clock without adding an external crystal oscillator into your board. The RCX is not as stable as the external XTAL, and the power consumption is higher when using the RCX.

Q3: No, it is not possible to share the QSPI pins, because they are dedicated for the QSPI Controller. When using the QSPI Controller, you don’t need to configure these pins.

Thanks, PM_Dialog

nigelyang
Offline
Last seen:2 months 2 days ago
Joined:2018-03-20 08:24
Q1:我在弯角bl

Q1:我在弯角bl project and reference it in my application, like the below
/**
* \brief Entry for gpio interrupt
*
* \param [in] _name name that will be later used to refer to instance
* \param [in] _port port id of triggering pin
* \param [in] _pin pin id of triggering pin
* \param [in] _press_callback function to be called when GPIO is asserted
* \param [in] _release_callback function to be called when GPIO is de-asserted
*/
#define AD_GPIO_INTR_INSTANCE(_name, _port, _pin, _press_callback, _release_callback) \
static INITIALISED_PRIVILEGED_DATA ad_gpio_intr_config dev_##_name = { \
.index = CONV_PORT_PIN_TO_INDEX((_port << 4) | (_pin & 0x0F)), \
.pressed = false, \
.press_cb = _press_callback, \
.release_cb = _release_callback, \
.next_element = NULL, \
}; \
静态ad_gpio_intr_config * const _name = &dev_ # #_name;

PM_Dialog
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi nigelyang,

Hi nigelyang,

Could you please clarify which project you are using? Are you using the wearable project or a project from SDK example? In case you are using the wearable project, did you buy the wearable hardware? Otherwise, if you are using an SDK example, why did you get code from the wearable reference design?

Thanks, PM_Dialog

nigelyang
Offline
Last seen:2 months 2 days ago
Joined:2018-03-20 08:24
hi Dialog,

hi Dialog,

I am developing my application code based on SDK project, but I read and used parts of the WRBL project code in my project, especially Button setting part. Is there any problem for my button settings result in high current if using P2_1 and P2_4 as input? If no any hardware difference, this may be PCB design problem?! However, my two PCB both have this kind of phenomenon. thanks for your help.

PM_Dialog
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi nigelyang,

Hi nigelyang,

Sorry but I am a little bit confused with your description. Could you please describe exactly what you are trying to implement? If I am able to understand correctly, do you have a custom board? Please, let me know about the button’s settings and I will provide you the proper code snippet with the configurations.

Thanks, PM_Dialog

nigelyang
Offline
Last seen:2 months 2 days ago
Joined:2018-03-20 08:24
Hi Dialog,

Hi Dialog,

Yes, I am implementing in the custom board(my own board). I ever tried a lot of time to catch a low to high signal for triggering my system from sleep, but fail. So I tried to imitate the button setting in wrbl project in order to save the problem. To simplify my question, is there any wrong in my below code about external wakeup pin? (to catch low to high trigger)

hw_gpio_configure_pin(STATUS_PORT, STATUS_PIN, HW_GPIO_MODE_INPUT, HW_GPIO_FUNC_GPIO, 0); //0: act as Low Pin : P2_3
hw_wkup_init(NULL);
hw_wkup_configure_pin(STATUS_PORT, STATUS_PIN, 1 , HW_WKUP_PIN_STATE_HIGH); // trigger @high
hw_wkup_register_interrupt(Status_wkup_handler,1);

/* Status_wkup_handler */
static void FP_Status_wkup_handler(void)
{
printf("here is Status_wkup_handler \r\n");
hw_wkup_reset_interrupt();
notify_task_verify_ok(); //
}

PM_Dialog
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi nigelyang,

Hi nigelyang,

You will find attached an example code snippet that demonstrates how you are able to wake up by pressing a push button.

Thanks, PM_Dialog

Attachment: