Search found 447 matches

by dannyf
Sun Nov 05, 2023 4:35 pm
Forum: Off topic
Topic: Taking a look at STM32G0 series
Replies: 94
Views: 157625

Re: Taking a look at STM32G0 series

for high speed crystals, just putting the crystal on would be sufficient, even on a breadboard. 32Khz crystlas require more care.

I would also put R1 directly across the gate's input / output.
by dannyf
Sat Nov 04, 2023 10:06 pm
Forum: Off topic
Topic: Taking a look at STM32G0 series
Replies: 94
Views: 157625

Re: Taking a look at STM32G0 series

R2 seemed too small. As is R1 - I usually go for the highest value / lowest drive. often 10M. load capacitance will depend on your particular crystal. I often use 15-22pf. OK to omit for most high frequency crystals. I prefer dual-input NAND (HC132): you can use the other input pin as OE. The layout...
by dannyf
Sat Nov 04, 2023 6:05 pm
Forum: General discussion
Topic: new Blackpill STM32G431CBU6
Replies: 22
Views: 17260

Re: new Blackpill STM32G431CBU6

I tried this on PY32, but untested on G0/G4. //simplest routine to switch to HSE //no error checking void SystemCoreClock2HSE(void) { //turn on hse RCC->CR |= RCC_CR_HSEON; //1->turn on HSE, 0->turn off HSE //wait for HSE to be ready - error if stuck here while ((RCC->CR & RCC_CR_HSERDY)==0); //...
by dannyf
Sat Nov 04, 2023 6:04 pm
Forum: General discussion
Topic: new Blackpill STM32G431CBU6
Replies: 22
Views: 17260

Re: new Blackpill STM32G431CBU6

Another way though is a simple (npn) transistor depends on what you want to do. if you are looking to output ac, both 2822/386 will work. if you are looking to buffer the output (amplify current), a follower would be better / simpler. I often use 5532 - good current capability, and output down to g...
by dannyf
Thu Nov 02, 2023 11:15 pm
Forum: General discussion
Topic: new Blackpill STM32G431CBU6
Replies: 22
Views: 17260

Re: new Blackpill STM32G431CBU6

may want to check out tda2822. dual channel vs. mono on 386.
by dannyf
Thu Nov 02, 2023 5:23 pm
Forum: General discussion
Topic: STM32 USART register
Replies: 1
Views: 4373

Re: STM32 USART register

the easiest way to port a piece of code is to understand its functionality first and then replicate that functionality on your target chip. the code here seems to be about transmitting over uart: it waits for the uart to be available, and then send something over. so you need two functions: 1. detec...
by dannyf
Thu Nov 02, 2023 5:19 pm
Forum: General discussion
Topic: new Blackpill STM32G431CBU6
Replies: 22
Views: 17260

Re: new Blackpill STM32G431CBU6

the answer to your question depends on a lot of factors, like your environment, your goal (do you want to boot-up to HSE or do you want to boot-up to HSI and switch over to HSE?)... the easiest is to write a set of routings that switch between differernt clock sources. You can do that via HAL/LL or ...
by dannyf
Mon Oct 30, 2023 8:37 pm
Forum: IDE's
Topic: Arduino IDE 2.x (2.2)
Replies: 9
Views: 12519

Re: Arduino IDE 2.x (2.2)

I often use two timer ISRs that flip the led pin at slightly different intervals. This leads to the duty cycle on the led goes up and down gradually.

the output compare interrupts are best for this.
by dannyf
Thu Oct 26, 2023 10:31 pm
Forum: General discussion
Topic: Speed Up your IO !!
Replies: 16
Views: 5924

Re: Speed Up your IO !!

This is what I get with F411CE: without knowing what the cpu is running at, the raw GPIO speed doesn't mean a whole lot. the digitalWriteFAST() implementation is essentially an if-then-else branching on top of a BSRR / BRR macro. For a known value, a smart compiler will reduce it to just BSRR or BR...

Go to advanced search