cancel
Showing results for 
Search instead for 
Did you mean: 

Comparitor interrupt on STM32L151?

emily
Associate
Posted on June 12, 2013 at 13:45

Hi all,

I'm using a STM32L151VCT6.

I was hoping to make use of the internal interupt associated with Comparitor 2 (EXTI 22).

On further inspection, I've noticed the Reference Manual (RM0038) shows two block diagrams showing interconnections of COMP2 (

RM0038 rev8, Section 13.5, Figure 63

and 64). The diagrams show low/medium density devices have an interupt EXTI line 22, where as the medium plus/high density devices do not.

In contry to the above, Table 36 (in RM0038) shows the interrupt vector table which seems to suggest that a medium plus device does have access to EXTI line 22 from the comparitor.

Has anyone come across this, or used EXTI 22 on a STM32L151 device?

Kind regards,

Emily

RM0038 rev8, section 13.5 Comparitor 2, Figure 63 shows an external interupt associated with the COMP2 output (EXTI line 22). In Figure 64 (for high and medium+ devices) the diagram doesn't show an external interupt. Other documentation doesn't make any mention of the medium+ devices not having this interupt. Am I missing something? Does the STM32L151VCT6 have an external interupt connected to COMP2? Kind regards Emily,

2 REPLIES 2
Posted on June 12, 2013 at 16:57

The diagram is a bit ugly, I think it's just expressing to connectivity to the comparator differently, with less regard to what's then connected to the output. The diagrams are not contemporaneous, and likely pulled from different internal design documents.

There are repeated, unqualified, representations in the document that ''EXTI Line 22'' is connected to COMP2. There is no errata related to the silicon. The firmware examples also do not make any reference to lack of function in newer silicon. Figure 65 shows downstream connectivity.

STM32L1xx_StdPeriph_Lib_V1.1.1\Project\STM32L1xx_StdPeriph_Examples\COMP\COMP_AnalogWatchdog

STM32L1xx_StdPeriph_Lib_V1.1.1\Project\STM32L1xx_StdPeriph_Examples\COMP\AnalogVoltageMonitoring

  - This example runs on STM32L1xx Ultra Low Power High-, Medium-Density and Medium-Density Plus Devices.

 

 

  - This example has been tested with STMicroelectronics STM32L152D-EVAL (STM32L1xx Ultra Low Power High-Density) and STM32L152-EVAL (STM32L1xx Ultra Low Power Medium-Density) evaluation board and can be easily tailored to any  other supported device and development board.

 

I think functionality could be readily demonstrated.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 13, 2013 at 18:02

I've queried an ST rep on this and the original 128KB Medium Density part does NOT have a COMP2

This may include parts on most of the original STM32L-Discovery boards, with 128KB devices. The new ''Special Ed'' version of the STM32L-Discovery has an STM32L152RCT6 which is a 256KB version.

This information is not very well spelled out in the documentation, or presentations.

A further limitation with the comparators relates to their use with the ADC, as they share some common resources (analogue mux?)

Edit: Still wading through documentation and most everything claims there are two comparators, the examples suggest there are two, yet I have other presentation materials that say it doesn't and people telling me it doesn't. The original STM32L-Discovery has an

http://www.st.com/web/catalog/mmc/FM141/SC1544/SS1374/LN1041/PF248820

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..