Search found 94 matches

by mlundin
Wed Nov 18, 2020 2:40 pm
Forum: General discussion
Topic: Code doesn't seem to run Nucleo-F401RE
Replies: 11
Views: 27686

Re: Code doesn't seem to run Nucleo-F401RE

For the Nucleo board use "Nucleo-64" and not "Generic STM32F4 series", then select "Nucleo F401RE"

What code are you trying to run?
by mlundin
Wed Nov 18, 2020 10:23 am
Forum: Projects
Topic: loop too slow
Replies: 8
Views: 8191

Re: loop too slow

You have duplicated lastT += T_REFRESH so the refresh interval is 2*T_REFRESH = 100ms. The getVPP() function takes 20ms. As for the refresh of the AC values, it is a mean value of 25 VPP samples and they are taken very 100ms so there is a 2.5s time constant before the new value is stable.
by mlundin
Wed Nov 18, 2020 10:15 am
Forum: General discussion
Topic: [Solved] SD.h or SDfat.h with SPI2
Replies: 9
Views: 11369

Re: [Solved] SD.h or SDfat.h with SPI2

FerroFerido There is a SD library https://github.com/stm32duino/STM32SD. The library can be installed from the Arduino library manager. There are example projects distributed with the library.

Nobody can give more help without information about what board you have, the SD card reader and the type ...
by mlundin
Tue Nov 17, 2020 8:27 am
Forum: Projects
Topic: loop too slow
Replies: 8
Views: 8191

Re: the loop is stuck

The test for T_REFRESH will misbehave when millis() overflows, using the difference and converting to signed will return correct values even after millis overflows.


if ( (int)(millis()-lastT) < T_REFRESH )
return;
lastT += T_REFRESH;


The display code is called only when/while the button is ...
by mlundin
Mon Nov 16, 2020 4:13 pm
Forum: General discussion
Topic: STM32F1xx RTC date problem
Replies: 7
Views: 7377

Re: STM32F1xx RTC date problem

The STM32F1xx RTC only has one register that normally counts seconds, using the count of seconds modulo 86400 (number of seconds in a day) it can keep track of the time of day, when this count gets larger than 86400 we know that one day has passed. There is no information in the RTC hardware about ...
by mlundin
Fri Nov 13, 2020 10:40 am
Forum: PR's bugs and enhancements
Topic: Suggestions for stm32f746disco variant
Replies: 1
Views: 15342

Suggestions for stm32f746disco variant

I know its easy to change in the card variant files but I think as a default the following changes are useful.

1) Add PK3 and PI13 to the defined pins:

#define PK3 26 // LCD Backlight Control
#define PI13 27 // LCD Interrupt pin


2) Uncomment the Audio and LCD I2C pins PH_7 and PH_8 in ...
by mlundin
Thu Nov 12, 2020 4:35 pm
Forum: PR's bugs and enhancements
Topic: Nucleo-144 stm32F767zi
Replies: 4
Views: 18413

Re: stm32F767 Generic use

The STM32F7xx processors doesnt have a CRH register. Pin mode is set using the MODER register, and eventually for alternate functions the AFRL and AFRH registers ( sometimes coded as AFR[0] and AFR[1] ) .
Read the GPIO section in the reference manual for the relevant GPIO registers.

So setting PF11 ...
by mlundin
Mon Nov 09, 2020 6:53 pm
Forum: General discussion
Topic: how to overclock?
Replies: 5
Views: 6278

Re: how to overclock?

Cannot see any MUL in the posted code ?

Do you have PLL off as the posted code says, RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; ?

Do you call the SystemClock_Config() at the beginning of every loop ?
by mlundin
Mon Nov 09, 2020 8:13 am
Forum: General discussion
Topic: How to use timer?
Replies: 9
Views: 13963

Re: How to use timer?

All registers in STM32 processors are available using Arduino IDE and the STM32 Core, so with careful reading of the processor manuals and lots of testing and googling for information there is not much you cannot do. Of course you must also not to get into conflict with the exiting code from the ...
by mlundin
Fri Nov 06, 2020 3:09 pm
Forum: STM boards (Discovery, Eval, Nucleo, ...)
Topic: STM32F4 serial.Available()?
Replies: 7
Views: 12155

Re: STM32F4 serial.Available()?

If you dont know the number of bytes in the response message, then I assume there is a specific code or byte sequence to signal the end of the message. Perhaps there is also a known maximum length of the message.

The Serial.available() will only tell you the current number of bytes that has arrived ...

Go to advanced search