Author Topic: CTMU like peripheral on STM32  (Read 620 times)

0 Members and 1 Guest are viewing this topic.

Offline mercurialTopic starter

  • Contributor
  • Posts: 49
  • Country: gb
CTMU like peripheral on STM32
« on: February 01, 2024, 05:55:33 am »
I see that Microchip has CTMU(Charge time measurement unit) peripheral which is versatile and can be used for high resolution (< 100ps) time measurement applications.
I couldn't find similar peripheral in other MCU brands, i could have probably missed it do any other MCU brands especially STM32 support high resolution time measurement in hardware like the CTMU.

If not is it possible to implement such functionality external to the device, I see that we might need a fast switching current source, but are there any other implications in trying to do so. Has someone already done this on an STM32 or on a MCU that doesn't have a CTMU.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: CTMU like peripheral on STM32
« Reply #1 on: February 01, 2024, 08:58:55 am »
I've not seen a similar device anywhere. The closest is probably a capacitive sensor designed for touch buttons, which you might be able to use for some of the same applications.

I did check out the high resolution timer in some of the newest STM32s, but it seems to be designed to generate - not measure - pulses with very fine resolution.
 
The following users thanked this post: mercurial

Offline jwet

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: us
Re: CTMU like peripheral on STM32
« Reply #2 on: February 02, 2024, 05:48:27 pm »
There are a few specialty parts like the CTMU and you could roll your own with an onboard MCU CCAP timer.  It depends what you're trying to do.  The microchip stuff is nice for basic timing.  Some options follows.

Maxim (ADI) makes a  part called the MAX35102 which has a resolution of 20 pS.  It was designed for use in flowmeters and laser time of flight.  These are called TDC or TAC's- time to digital converters.

Maxim (ADI) also make "time verniers" that were used as precision delays in Automatic Test Equipment pin drivers.  This stuff is exotic and expensive but you can get timing down to the picosecond.  Look at MAX32000 series or ADATE 9.. series. 

You can roll your own CTMU like function with a constant current source, fast comparator and a standard timer with CCAP type functions where an input can capture the time.

A small FPGA could be used to implement a function like this and give you some flexibility. 

Good luck.
« Last Edit: February 02, 2024, 05:57:39 pm by jwet »
 
The following users thanked this post: mercurial

Offline bidrohini1

  • Contributor
  • !
  • Posts: 16
  • Country: bd
Re: CTMU like peripheral on STM32
« Reply #3 on: February 03, 2024, 01:06:03 pm »
For high-resolution time measurements, you can utilize the input capture feature of the timers.
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5913
  • Country: es
Re: CTMU like peripheral on STM32
« Reply #4 on: February 03, 2024, 01:35:32 pm »
I wouldn't waste useful peripherals for touch buttons (If that's your target), there're touch sensors for 3 cents:
https://www.lcsc.com/product-detail/Touch-Sensors_Shenzhen-Fuman-Elec-TC233A_C2798022.html

For precise reading of capacitance variation, the MPR121 provides 12 independent channels with 10-bit resolution, though a bit expensive, reaching $1 mark:
https://www.lcsc.com/product-detail/Touch-Sensors_NXP-Semicon-MPR121QR2_C91322.html
« Last Edit: February 03, 2024, 01:45:51 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline mercurialTopic starter

  • Contributor
  • Posts: 49
  • Country: gb
Re: CTMU like peripheral on STM32
« Reply #5 on: February 05, 2024, 07:03:17 pm »
Some really good suggestions for rolling out your own CTMU,
But some questions remains. If we need picosecond resolution, the current source has to be switched atleast in 10's of picosecond range if not lower. How does one achieve this without breaking the bank?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf