Search found 403 matches

by GonzoG
Sun Jun 18, 2023 9:09 am
Forum: General discussion
Topic: STM bootloader problem
Replies: 2
Views: 1204

Re: STM bootloader problem

You need to enable USB CDC in your sketch, otherwise COM port won't be enabled.
If you don't enable USB CDC you can enter bootloader by setting boot1 jumper to 1 position and resetting board (if you flashed HID bootloader).
by GonzoG
Sun Jun 04, 2023 4:59 pm
Forum: General discussion
Topic: Nucleo-32 L432KC doesn't work when powered by 3v3
Replies: 3
Views: 680

Re: Nucleo-32 L432KC doesn't work when powered by 3v3

5V pin, USB 5V, ST-Link 5V all are connected to one point. If it runs powered from USB, it has to run powered from 5V pin. BUT your 5V supply needs to be 5V +/- 0,25, not 4.5, nor 5.5V If you did what manual says, LD2 cannot lit up when powered with 3.3V pin. SB14 needs to be OFF (removed / not brid...
by GonzoG
Thu May 25, 2023 9:20 am
Forum: General discussion
Topic: Disable system reset on USB connect/disconnect
Replies: 5
Views: 3896

Re: Disable system reset on USB connect/disconnect

There is no such thing. STMs do not need to reset on USB connect like AVR Arduino boards.
If your board resets then it's rather hardware related.
by GonzoG
Mon May 22, 2023 9:03 am
Forum: General discussion
Topic: STM32 timer interrupt
Replies: 6
Views: 10070

Re: STM32 timer interrupt

STM32 examples for timers are for STM32 core, not for a specific MCU. You don't have to adapt anything.
by GonzoG
Sat May 20, 2023 10:04 pm
Forum: IDE's
Topic: Unable to upload a skect to STM32 Bluepill
Replies: 3
Views: 6518

Re: Unable to upload a skect to STM32 Bluepill

Blue pills usually do not have usb bootloader flashed. You need to do it yourself and for this you need ST-Link or USB-TTL adapter.
by GonzoG
Sun May 14, 2023 10:47 pm
Forum: General discussion
Topic: BluePill fast 10 us Timer interrupt example code needed
Replies: 29
Views: 3826

Re: BluePill fast 10 us Timer interrupt example code needed

digitalWriteFast/digitalReadFast need 1 MCU cycle. that would be very difficult to do. digitalWriteFast() calls digital_io_write(), which goes through a if..then statement before calling LL_GPIO_SetOutputPin(), which goes to a set of register writes. Hard to believe all that could be done in one cy...
by GonzoG
Sun May 14, 2023 11:27 am
Forum: General discussion
Topic: BluePill fast 10 us Timer interrupt example code needed
Replies: 29
Views: 3826

Re: BluePill fast 10 us Timer interrupt example code needed

maybe something like this will help. #define LED_PORT GPIOC #define LED_PIN (1<<13) //LED on C13 #define IO_SET(port, pins) port |= (pins) #define IO_CLR(port, pins) port &=~(pins) #define IO_FLP(port, pins) port ^= (pins) #define GIO_SET(gpio, pins) IO_SET(gpio->ODR, pins) #define GIO_CLR(gpio...
by GonzoG
Sun May 14, 2023 7:17 am
Forum: General discussion
Topic: Unable to calculate/update Theta value for d-q transformation (Park Transformation)
Replies: 7
Views: 1731

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

There's "big" user error and your program crashes. ... Theta[200].... for(int n=2;n<200;n++) { ... Theta[n+1]=... } What do you mean? can you elaborate or suggest a fix? Theta is 200 element array - last element's index is 199. for(int n=2;n<200;n++) runs for n=2 to 199. There is no Theta...
by GonzoG
Sun May 14, 2023 7:00 am
Forum: General discussion
Topic: BluePill fast 10 us Timer interrupt example code needed
Replies: 29
Views: 3826

Re: BluePill fast 10 us Timer interrupt example code needed

... As Gonzo G suggested, I am not using digitalWriteFast anymore. I was expecting a higher speed. Am I wrong? Here is the code: #ifndef _NOP // required for some non Arduino cores #define _NOP() do { __asm__ volatile ("nop"); } while (0) #endif #define PIN PC13 void setup() { pinMode(PIN...

Go to advanced search