Search found 403 matches

by GonzoG
Sat Mar 02, 2024 11:35 am
Forum: General discussion
Topic: Where to find "SysTick->VAL" is modified ?
Replies: 2
Views: 145

Re: Where to find "SysTick->VAL" is modified ?

You won't find it. It's hardware counter. It's changed by hardware.
by GonzoG
Sat Jan 27, 2024 10:03 am
Forum: STM32H7 based boards
Topic: STM32H723
Replies: 3
Views: 1251

Re: STM32H723

SKR 3 uses 25MHz external oscillator, generic H723 is defined with internal oscillator, you might need to define new board variant: https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-%28board%29 or redefine SystemClock_Config(void) Also, I think that HS USB needs external PHY th...
by GonzoG
Wed Jan 24, 2024 6:58 pm
Forum: General discussion
Topic: I failed to output PWM with PA7 and PA8 at the same time
Replies: 4
Views: 1488

Re: I failed to output PWM with PA7 and PA8 at the same time

analogWriteFrequency(1000);is to set the frequency of all PWM, how to set the frequency of 1 pin separately analogWriteFrequency(); changes frequency for next use of analogWrite(), but it will change frequency for all channels on a timer. If you use 2 or more pins that use same timer for PWM, frequ...
by GonzoG
Thu Oct 26, 2023 7:06 pm
Forum: General discussion
Topic: Speed Up your IO !!
Replies: 16
Views: 4463

Re: Speed Up your IO !!

dannyf wrote: Wed Oct 25, 2023 9:42 pm
18MHz signal.
Fast IO is implemented via BRR/BSRR.

Hard to imagine that they could get that fast.
digitalWriteFast and digitalReadFast are using LL functions. With O3 (fastest) optimization they can go this fast.
On F401 and F411 they need 1 MCU cycle.
This is what I get with F411CE:
6.jpg
6.jpg (58.78 KiB) Viewed 1303 times
by GonzoG
Wed Oct 25, 2023 5:03 pm
Forum: General discussion
Topic: Speed Up your IO !!
Replies: 16
Views: 4463

Re: Speed Up your IO !!

I got 19MHz wit digitalReadFast and 33MHz with digitalWriteFast, but with typing 1000 lines of code. While loop needs few cycles. @GonzoG PLease give us your code ! (I do not pretend to get the fastest .. just starting to play) Sorry.. copied wrong values. Those were Mops/s, so frequency is half of...
by GonzoG
Mon Oct 23, 2023 7:27 pm
Forum: General discussion
Topic: Speed Up your IO !!
Replies: 16
Views: 4463

Re: Speed Up your IO !!

ManX84 wrote: Mon Oct 23, 2023 4:04 pm Need Faster ?

Code: Select all

	// Here use a digitalWriteFast !
	do
	{
		digitalWriteFast(PC_13, 1);
		digitalWriteFast(PC_13, 0);
	} while (1);
F = 7 MHz! :mrgreen:
I got 19MHz wit digitalReadFast and 33MHz with digitalWriteFast, but with typing 1000 lines of code.
While loop needs few cycles.
by GonzoG
Sat Oct 14, 2023 1:39 pm
Forum: General discussion
Topic: Load Firmware from sd
Replies: 6
Views: 1662

Re: Load Firmware from sd

It can be done, but not without using LL or CMSIS and it will need way more flash and RAM then code written in "pure" c/c++.

There are many open source bootloaders that use SD card to flash firmware. You might even find one for your MCU or might need to tweak few lines of code.
by GonzoG
Thu Oct 12, 2023 3:29 pm
Forum: General discussion
Topic: I2C Communication between DS3231 and STM32 BluePill
Replies: 1
Views: 880

Re: I2C Communication between DS3231 and STM32 BluePill

Have you tried any DS3231 library ??
by GonzoG
Fri Aug 25, 2023 4:35 pm
Forum: Projects
Topic: Voltage divider on Nucleo STM32L452RE bad accuracy
Replies: 8
Views: 4514

Re: Voltage divider on Nucleo STM32L452RE bad accuracy

So that brings me to two new questions: 1. if using such a voltage divider circuit for multiple PCB's, how do you ensure consistency? Measure the actual resistance values prior to uploading code, and then hardcode the individual resistor values into the Arduino program for each PCB? I.e. calibratio...

Go to advanced search