cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate 32.768khz STM32F103C8T6 bluepill for Max30003 sensor?

MGGd.1
Associate II

There is MCO that supports PLLCLK, HSI, HSE, SYSCLK but not LSE with 32.768khz. How can I produce this frequency for FCLK pin of Max30003 sensor? Do I need use Timer? If yes could you send me some examples how to do it properly?

5 REPLIES 5

Set up an appropriate TIMx_CHx pin to AF push-pull output, set the timer's respective TIMx_CCMRx.OCxM to some of the PWM modes (or alternatively Toggle mode, where the output will be 50% duty and half the frequency of the timer's overrun frequency), set respective TIMx_CCER.CCxE to enable the PWM/Toggle output (and if it's and Advanced timer, set also TIMx_BDTR.MOE). Set timer's TIMx_ARR to match the required output frequency and enable the timer by setting TIMx_CR1.CEN.

JW

Thank you for reply. But can I use pins OSC32_IN and OSC32_OUT somehow for generating 32.768kHz frequency by LSE? Your explanation seems difficult to me, I don't know how to configurate it properly in CubeMX

You really wouldn't want to attach to the OSC32_IN/OUT pins with a crystal as you're likely to disturb the circuit characteristics. If you used a 32.768 KHz TCXO or XO, you could perhaps split that feed.

As I recall the F1 would allow the 32.768 KHz Divided by 64 to be gated out the PC13 TAMPER-RTC pin

Best course of action would be to use a TIM clocking at 72 MHz and divided by 2197, that would be around 32.772 KHz

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

Is it right configuration?

0693W00000ANHMeQAP.png

schar.11
Associate II

Can u provide the code for max30003 ecg, r to r, i am doing a project on max30003.