Search found 403 matches

by GonzoG
Sat May 13, 2023 10:48 pm
Forum: General discussion
Topic: BluePill fast 10 us Timer interrupt example code needed
Replies: 29
Views: 3831

Re: BluePill fast 10 us Timer interrupt example code needed

DON'T use any fast IO libraries with stm32duino.
1. this library for AVR based boards. With STM32 core it uses standard digitalWrite();
2. digitalWriteFast() and digitalReadFast() are a builtin functions in STM32 core.

Code: Select all

digitalWriteFast(digitalPinToPinName(PA1),1);
//or
digitalWriteFast(PA_1,1);
by GonzoG
Sat May 13, 2023 10:32 pm
Forum: General discussion
Topic: Unable to calculate/update Theta value for d-q transformation (Park Transformation)
Replies: 7
Views: 1776

Re: Unable to calculate/update Theta value for d-q transformation (Park Transformation)

There's "big" user error and your program crashes.

Code: Select all

...
Theta[200]....

for(int n=2;n<200;n++)
{
...
Theta[n+1]=...
}
by GonzoG
Fri May 12, 2023 10:49 am
Forum: General discussion
Topic: 2 PWM output
Replies: 4
Views: 6642

Re: 2 PWM output

Hi, how can I set two (or more) different pwm-frequencys for two pwm-pins on STM32G071? I prefer analogWriteFrequency(herz), but I assume is only for all pwms - correct? analogWriteFrequency() is the easiest way. But it does not change frequency until analogWrite() i called and frequency changes on...
by GonzoG
Fri May 12, 2023 8:35 am
Forum: General discussion
Topic: No Port & Permission denied: macOS
Replies: 2
Views: 869

Re: No Port & Permission denied: macOS

F103 does not have hardware usb upload method. You need to flash usb bootloader first (using ST-Link or serial adapter).
Also it won't show bluepill's COM port until there's a sketch with USB CDC enabled flashed to it.
by GonzoG
Fri May 12, 2023 8:31 am
Forum: General discussion
Topic: BluePill fast 10 us Timer interrupt example code needed
Replies: 29
Views: 3831

Re: BluePill fast 10 us Timer interrupt example code needed

You don't need any additional libraries. Use hardware timer: https://github.com/stm32duino/Arduino_Core_STM32/wiki/HardwareTimer-library There's "Timebase_callback" example in stm32duino examples that does what you need. And if you want fast, set optimization to -O3 and use digitalWriteFas...
by GonzoG
Wed May 10, 2023 8:59 pm
Forum: General discussion
Topic: SIMPLE QUESTION BLUE PILL COMMUNICATIONS SETTINGS
Replies: 10
Views: 2040

Re: SIMPLE QUESTION BLUE PILL COMMUNICATIONS SETTINGS

You need a programmer to flash bootloader to F103 (ST-Link or usb-ttl). There is no other way. There are instructions how to flash HID bootloader.

hid_flash tool is for flashing your programs using HID bootloader.
by GonzoG
Wed May 10, 2023 10:24 am
Forum: General discussion
Topic: SIMPLE QUESTION BLUE PILL COMMUNICATIONS SETTINGS
Replies: 10
Views: 2040

Re: SIMPLE QUESTION BLUE PILL COMMUNICATIONS SETTINGS

You don't have HID bootloader on your board.
stm32duino bootloader is based on Maple bootloader and you need to select "Maple bootloader 2.0" or flash HID bootloader: https://github.com/Serasidis/STM32_HID_Bootloader
by GonzoG
Sat May 06, 2023 8:21 pm
Forum: General discussion
Topic: analogRead() Freezes the program
Replies: 12
Views: 1634

Re: analogRead() Freezes the program

Have you checked if board setup in stm32duino (clocks, etc) is same are your hardware ?? Proteus only has External Clock Frequency for STM which is set to 8Mhz by default Idk about board setup, please let me know what files have configs So it's not an issue with stm32duino, but with Proteus.
by GonzoG
Sat May 06, 2023 2:51 pm
Forum: General discussion
Topic: analogRead() Freezes the program
Replies: 12
Views: 1634

Re: analogRead() Freezes the program

Have you checked if board setup in stm32duino (clocks, etc) is same are your hardware ??
by GonzoG
Mon May 01, 2023 1:38 pm
Forum: STM32 HID bootloader
Topic: HID Upload Error Arduino
Replies: 5
Views: 11639

Re: HID Upload Error Arduino

" Error - [1209:BEBA] device is not found"
Means that your board does not have HID bootloader or it couldn't be booted into bootloader.

Port has to disconnect, as the board needs to reset to enter bootloader.

Go to advanced search