Search found 105 matches

by AndrewBCN
Fri Jun 04, 2021 8:55 am
Forum: Code snippets
Topic: 16-bit PWM resolution example (4 lines of code)
Replies: 0
Views: 19836

16-bit PWM resolution example (4 lines of code)

As we all know, for backward compatibility with AVR MCU's, the default resolution for PWM output in STM32 Core is 8-bits, this provides a "granularity" of 1/256 = approx. 0.4%. However, since STM32 MCUs in general implement a number of 16-bit timers, we have the option of setting the PWM resolution ...
by AndrewBCN
Thu Jun 03, 2021 10:43 am
Forum: General discussion
Topic: Making my STM32F303 act as an SPI slave
Replies: 2
Views: 4496

Re: Making my STM32F303 act as an SPI slave

The reference manual seems to indicate that the hardware is capable of spi slave operation:
SPI features

Full-duplex synchronous transfers on three lines
Simplex synchronous transfers on two lines with or without a bidirectional data line
8- or 16-bit transfer frame format selection
Master or ...
by AndrewBCN
Wed Jun 02, 2021 8:53 pm
Forum: General discussion
Topic: can .ino be C code?
Replies: 9
Views: 9258

Re: can .ino be C code?

From: https://arduino.stackexchange.com/questions/33104/how-do-i-order-the-gcc-compiler-to-generate-s-flag-in-arduino-ide

Compiler flags are defined in the platform.txt of the board you have selected in the Tools > Board menu. You can also add compiler flags via a build.extra_flags property in the ...
by AndrewBCN
Tue Jun 01, 2021 1:42 pm
Forum: Projects
Topic: STM32 GPSDO
Replies: 57
Views: 1117997

Re: STM32 GPSDO


Rough sketch, on a PIC32 :
...


Hi dannyf,
There is at least one, possibly two serious conceptual mistakes in your rough sketch, as you'll immediately realize once you have implemented and tested it. However, I would appreciate it if you could please create a new topic in the "Off topic" section ...
by AndrewBCN
Tue Jun 01, 2021 11:51 am
Forum: Projects
Topic: STM32 GPSDO
Replies: 57
Views: 1117997

STM32 GPSDO Version v0.04a pushed to GitHub

I have just pushed Version v0.04a to GitHub, this is the first version in the 0.04 series. In this series, I intend to improve the general operation of the GPSDO, implement auto-calibration and holdover operating modes, improve internal status reporting, and experiment with various low-pass filter ...
by AndrewBCN
Mon May 31, 2021 2:32 pm
Forum: Projects
Topic: STM32 GPSDO
Replies: 57
Views: 1117997

Re: STM32 GPSDO


I spent sometime on his code.

You probably spent more time than I did. I browsed through it weeks ago and very early on noticed that Lars' code is totally inseparable from his hardware design. Also it's definitely not my style.

what I like:
1. he indeed used input capture for the 1pps signal ...
by AndrewBCN
Mon May 31, 2021 1:37 pm
Forum: Projects
Topic: STM32 GPSDO
Replies: 57
Views: 1117997

Re: STM32 GPSDO


The TIC circuit, HC4046 plus D1, R1 and C1 measures the phase relation between the oscillator divided down to 1MHz and the PPS1. The output voltage over C! that is then read by the ADC is an increasing (not really linear, more exponentially increasing so the initial slope is more or less linear ...
by AndrewBCN
Mon May 31, 2021 11:46 am
Forum: Projects
Topic: STM32 GPSDO
Replies: 57
Views: 1117997

Re: STM32 GPSDO


His design uses ADC to see if the phase is stable.
Not exactly. The AVR ADC input is used to measure the voltage of the 1ns resolution TIC circuit (which you had mistaken for a lpf). That's the reason I call his control loop a "hybrid digital/analog PLL".
These ADC readings are then filtered and ...
by AndrewBCN
Mon May 31, 2021 2:08 am
Forum: Projects
Topic: STM32 GPSDO
Replies: 57
Views: 1117997

Re: STM32 GPSDO


you can build a LPF from a rc network -> he has the lpf on the output from the phase comparator.

No, that circuit is a ns-resolution TIC, not a lpf. Things are a little bit more complicated than a superficial look in Lars' design, you should try to read his code, but I admit that is rather ...
by AndrewBCN
Sun May 30, 2021 5:19 pm
Forum: Projects
Topic: STM32 GPSDO
Replies: 57
Views: 1117997

Re: STM32 GPSDO


he already have the phase differential information out of the phase comparator so why not just use that to drive the vco? what does the pro mini do there?


The MCU is programmed as a low pass filter on that phase differential information, as well as various other auxiliary functions.

A Low ...

Go to advanced search