Hi,
What is the best place to define correct EXTI->PRx register for RTC driver / alarm line?
For example:
STM32L1 uses EXTI->PR register
and
STM32L4 uses EXTI->PR1
RTC and EXTI driver in version 19.1 support only EXTI->PR1 register
Thanks in advance!
RTC driver and EXTI->PR Topic is solved
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: RTC driver and EXTI->PR
Hi,
The PAL driver does it this way:
The same is also in stm32_exti.h:
Probably it should only be in EXTI and other drivers should use it. I am looking into this.
Giovanni
The PAL driver does it this way:
Code: Select all
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/
/* Handling a difference in ST headers.*/
#if defined(STM32L4XX) || defined(STM32L4XXP)
#define EMR EMR1
#define IMR IMR1
#define PR PR1
#define RTSR RTSR1
#define FTSR FTSR1
#endif
The same is also in stm32_exti.h:
Code: Select all
/* Handling differences in ST headers.*/
#if !defined(STM32L4XX) && !defined(STM32L4XXP)
#define EMR1 EMR
#define IMR1 IMR
#define PR1 PR
#define RTSR1 RTSR
#define FTSR1 FTSR
#endif
Probably it should only be in EXTI and other drivers should use it. I am looking into this.
Giovanni
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: RTC driver and EXTI->PR
Hi,
Fixed as bug #1022.
It should be fine in trunk and 19.1.x now, could you check?
Giovanni
Fixed as bug #1022.
It should be fine in trunk and 19.1.x now, could you check?
Giovanni
Re: RTC driver and EXTI->PR
Hi,
it seems STM32L1xx/stm32_registry.h does not contain:
#define STM32_RTC_TAMP_STAMP_HANDLER
#define STM32_RTC_WKUP_HANDLER
#define STM32_RTC_ALARM_HANDLER
#define STM32_RTC_TAMP_STAMP_NUMBER
#define STM32_RTC_WKUP_NUMBER
#define STM32_RTC_ALARM_NUMBER
#define STM32_RTC_ALARM_EXTI
#define STM32_RTC_TAMP_STAMP_EXTI
#define STM32_RTC_WKUP_EXTI
#define STM32_RTC_IRQ_ENABLE()
it seems STM32L1xx/stm32_registry.h does not contain:
#define STM32_RTC_TAMP_STAMP_HANDLER
#define STM32_RTC_WKUP_HANDLER
#define STM32_RTC_ALARM_HANDLER
#define STM32_RTC_TAMP_STAMP_NUMBER
#define STM32_RTC_WKUP_NUMBER
#define STM32_RTC_ALARM_NUMBER
#define STM32_RTC_ALARM_EXTI
#define STM32_RTC_TAMP_STAMP_EXTI
#define STM32_RTC_WKUP_EXTI
#define STM32_RTC_IRQ_ENABLE()
Vitaly
Re: RTC driver and EXTI->PR
Code: Select all
#define STM32_RTC_TAMP_STAMP_HANDLER Vector48
#define STM32_RTC_WKUP_HANDLER Vector4C
#define STM32_RTC_ALARM_HANDLER VectorE4
#define STM32_RTC_TAMP_STAMP_NUMBER 3
#define STM32_RTC_WKUP_NUMBER 1
#define STM32_RTC_ALARM_NUMBER 2
#define STM32_RTC_ALARM_EXTI 17
#define STM32_RTC_TAMP_STAMP_EXTI 19
#define STM32_RTC_WKUP_EXTI 20
Vitaly
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Who is online
Users browsing this forum: No registered users and 18 guests