STM32L1 connection from PC3 through COMP1_SW1 to COMP1+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-12-16 7:05 AM
Hello,
There are apparently some inconsistencies concerning COMP1_SW1 in the RM0038 Reference Manual (Rev 13).- Starting at Page 195, Section 8.3.1, it says COMP1_SW1 is available in Cat.4, Cat.5 and Cat.6 devices.
- However, Page 342 in Section 14.9.1 says the enable bit for COMP1_SW1 is available in Cat.4 devices only. Moreover, the text states that the switch connects to the negative input of COMP1, but all the drawings show it is connected to the positive one.
- Figures 26 and 27 in Section 8.2 show a direct connection from PC3/ADC_IN13 to COMP1_SW1 for Cat.3 through Cat.6 devices.
- However, on Figure 64 in Section 14.4 this connection is missing.
Which controllers do actually have this switch and the connection, and if they are present, does it mean that one can use PC3 as a more direct input to COMP1, bypassing the ADC switch matrix?
#comparator #stm32l1- Labels:
-
STM32L1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-12-17 3:02 AM
OK, I've tested it with a STM32L151VCT6A, which is a mere Cat.3 device, it looks like COMP1_SW1 is there. Enabled the clocks, set PC3 to analog, then set
COMP->CSR = COMP_CSR_CMP1EN|COMP_CSR_SW1;
connected an adjustable voltage source to PC3, and it just worked, the comparison result available inCOMP->CSR&COMP_CSR_CMP1OUT
Now, it would be nice to see it properly documented.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-12-17 3:17 AM
Hi berendi.peter,
It seems that the cause of the confusion is the OPAMP3 which is available only on Cat4.I agree with you that documentation needs to be cleaned in order to provide the exact information.I check this deeply and then I will keep you informed.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-12-17 7:31 AM
- Starting at Page 195, Section 8.3.1, it says COMP1_SW1 is available in Cat.4, Cat.5 and Cat.6 devices.
==> OPAMP3 connection with COMP1_SW1 is available only in Cat1. The RM0038 will be aupdated accordingly.
- However, Page 342 in Section 14.9.1 says the enable bit for COMP1_SW1 is available in Cat.4 devices only. Moreover, the text states that the switch connects to the negative input of COMP1, but all the drawings show it is connected to the positive one.
==> COMP1_SW1 is connected to the positive input as described in the figures. So the text will be corrected.
- Figures 26 and 27 in Section 8.2 show a direct connection from PC3/ADC_IN13 to COMP1_SW1 for Cat.3 through Cat.6 devices.
- However, on Figure 64 in Section 14.4 this connection is missing.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-12-18 1:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-12-18 2:33 AM
Did one more test (with the code above) on a 32L152CDISCOVERY board, which is equipped with STM32L152RCT6 (without the -A suffix), and it did not work. That actually makes sense, because the -xCT6A are actually dumbed-down Cat.4 devices labeled as Cat.3, but the ones without -A are meant to be Cat.3 by design.
