Search found 1918 matches

by ag123
Wed May 10, 2023 3:11 pm
Forum: Custom design boards
Topic: Clone Chinese board (STM32G030)
Replies: 6
Views: 18570

Re: Clone Chinese board (STM32G030)

for the 'embedded flash', the 'simplest' way, put it in code build it get the 'bin' file, that is the binary firmware image.
use st-link, usb-uart etc to 'install' it on the device, one can even 'click upload' in the Arduino ide ;)

the harder way, 1st there is the ref manual rm0454 ref manual ...
by ag123
Wed May 10, 2023 1:07 pm
Forum: Custom design boards
Topic: Clone Chinese board (STM32G030)
Replies: 6
Views: 18570

Re: Clone Chinese board (STM32G030)

normally, the eeprom 'isn't there', but that if the vendor puts it on the board, you can probably use it.
as it seemed it is connected at i2c1, as for the i2c address, you would either need to consult the specs/manual for the eeprom or probably use some 'i2c scanner' sketch to probe for it. probably ...
by ag123
Wed May 10, 2023 6:35 am
Forum: Custom design boards
Topic: Clone Chinese board (STM32G030)
Replies: 6
Views: 18570

Re: Clone Chinese board (STM32G030)

stm32g030 don't do usb, hence the options are using serial upload or st-link swd.
hence a 'bootloader' won't make sense after all.

you would need your own st-link dongle or a usb-uart dongle to update firmware with this one. that 'extra' chip, is a 'feature' if after all the vendor provides it, e.g ...
by ag123
Tue Apr 25, 2023 4:34 pm
Forum: General discussion
Topic: STM32 Library paths included in flash memory
Replies: 4
Views: 1720

Re: STM32 Library paths included in flash memory

if you are using the (arduino) IDE, check in the menu for debug options
no promises though, it is likely some symbols remains
by ag123
Mon Apr 24, 2023 6:50 pm
Forum: General discussion
Topic: STM32 Library paths included in flash memory
Replies: 4
Views: 1720

Re: STM32 Library paths included in flash memory

maybe it is debug info? try playing with the -g (debug) flags,
by ag123
Mon Apr 17, 2023 4:07 am
Forum: General discussion
Topic: Chinese Board Advice (Clock drift)
Replies: 9
Views: 3804

Re: Chinese Board Advice (Clock drift)

There is another tactic which I occasionally use for 'timing insensitive' codes.


void loop() {
// ... do something
sleep(10);
}

void sleep(int duration) {
long begin = millis();
while(millis() - begin < duration)
asm("wfi");
}


I tend to use this in place of delay() , this would likely be ...
by ag123
Sun Apr 16, 2023 3:55 pm
Forum: General discussion
Topic: Chinese Board Advice (Clock drift)
Replies: 9
Views: 3804

Re: Chinese Board Advice (Clock drift)

I think @dannyf is right about it, I think a default setup for stm32g030 is more likely to be running on HSI.
Getting it to run on HSE would require some work in the SystemClock_Config()
https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-%28board%29#3---generic-system-clock ...
by ag123
Sun Apr 16, 2023 6:57 am
Forum: General discussion
Topic: Chinese Board Advice (Clock drift)
Replies: 9
Views: 3804

Re: Chinese Board Advice (Clock drift)

you have a delay(2) in there, it would add 2 ms every true condition in the if block
and power_on+=10000; should be in the loop() part of the code.

either way instructions takes cycles to run and the call to millis() could consume quite a few every time the if(millis() - begin >= duration) clause ...
by ag123
Tue Apr 11, 2023 2:06 pm
Forum: General discussion
Topic: SD.begin( ) slow down the program
Replies: 6
Views: 2499

Re: SD.begin( ) slow down the program

if you are doing write operations, the timeout can be 100 times longer than the typical program times or 250 ms.
and for read 100 ms
https://www.sdcard.org/downloads/pls/
you may want to check the specs.

Go to advanced search