Aug 31, 2016
10:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 31, 2016
10:20 AM
I would like to generate an interrupt on ERU0_0_IRQn on falling edge of an input signal on pin RTC_XTAL1. The Port I/O function table says RTC_XTAL1 is linked to ERU0.1B1. However, it does not seem to work. I am confident that my ERU is configured correctly, as I can make it work with any GPIO pins. So, the problem seems to come from the pin RTC_XTAL1.
XTALGPI1SEL is set to 0 in SCU.HDCR. Is there any other register I should look at to make the RTC_XTAL1 pin work with ERU?
Thanks,
Cedric
XTALGPI1SEL is set to 0 in SCU.HDCR. Is there any other register I should look at to make the RTC_XTAL1 pin work with ERU?
Thanks,
Cedric
3 Replies
Sep 08, 2016
06:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 08, 2016
06:10 AM
Still waiting for an answer on this. If I could get a confirmation that this is not possible, then I would have to use another pin.
Sep 12, 2016
06:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 12, 2016
06:50 AM
Hi,
It should work. Please try, the following code.
Let me know if you need further help.
regards,
Jesus
It should work. Please try, the following code.
#include "xmc_scu.h"
#include "xmc_eru.h"
#define ERU0_ETL1_INPUTB_SCU_HIB_SR1 XMC_ERU_ETL_INPUT_B1
int main(void)
{
XMC_ERU_ETL_CONFIG_t eru_etl_config =
{
.input_b = ERU0_ETL1_INPUTB_SCU_HIB_SR1,
.source = XMC_ERU_ETL_SOURCE_B,
.status_flag_mode = XMC_ERU_ETL_STATUS_FLAG_MODE_HWCTRL,
.edge_detection = XMC_ERU_ETL_EDGE_DETECTION_RISING
};
XMC_SCU_HIB_EnableHibernateDomain();
XMC_SCU_CLOCK_EnableLowPowerOscillatorGeneralPurposeInput();
XMC_SCU_HIB_SetSR1Input(XMC_SCU_HIB_SR1_INPUT_XTAL_GPI);
XMC_ERU_ETL_Init(XMC_ERU0, 1, &eru_etl_config);
while(1U)
{
if (XMC_ERU_ETL_GetStatusFlag(XMC_ERU0, 1) == 0)
{
// input pressed
}
}
}
Let me know if you need further help.
regards,
Jesus
Jun 21, 2017
07:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 21, 2017
07:18 AM
Hi Jesus,
I currently face with same issue, using RTC_XTAL1 as ERU0.1B1 on XMC4500.
And I use XMClib v2.1.4 - XMC Peripheral Driver Library.
Unfortunately this 2 functions are not available for this lib:
XMC_SCU_CLOCK_EnableLowPowerOscillatorGeneralPurposeInput();
XMC_SCU_HIB_SetSR1Input(XMC_SCU_HIB_SR1_INPUT_XTAL_GPI);
Are there another functions available in my lib which I can use ? Or can you show me which register need to be initialized for this purpose ?
Thanks in advance.
I currently face with same issue, using RTC_XTAL1 as ERU0.1B1 on XMC4500.
And I use XMClib v2.1.4 - XMC Peripheral Driver Library.
Unfortunately this 2 functions are not available for this lib:
XMC_SCU_CLOCK_EnableLowPowerOscillatorGeneralPurposeInput();
XMC_SCU_HIB_SetSR1Input(XMC_SCU_HIB_SR1_INPUT_XTAL_GPI);
Are there another functions available in my lib which I can use ? Or can you show me which register need to be initialized for this purpose ?
Thanks in advance.