Search found 29 matches

by DrBanana
Mon Jan 06, 2025 3:19 pm
Forum: General discussion
Topic: High Speed Serial
Replies: 11
Views: 1461

Re: High Speed Serial

Yes thats exactly what I want at the end. I need to read some data from a sensor thats using RS485 NRZ with 2.5Mhz rate. I cant change baud rate because its hard coded in sensor.

Is there any chip I can use that handles all this ?
by DrBanana
Thu Jan 02, 2025 1:27 pm
Forum: General discussion
Topic: High Speed Serial
Replies: 11
Views: 1461

Re: High Speed Serial

I tried STM32F405RG, which suppose to have 5.25 Mbit/s, it also output random crap on serial.

Using following to make it run on 168Mhz

extern "C" void SystemClock_Config(void) {

RCC_OscInitTypeDef RCC_OscInitStruct = { 0 };
RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 };

/** Configure the main ...
by DrBanana
Tue Dec 31, 2024 2:00 am
Forum: General discussion
Topic: Read MCU's Unique
Replies: 1
Views: 285

Read MCU's Unique

Is there anyway to read Unique Id of any STM32 MCU through this core ?
by DrBanana
Sat Dec 28, 2024 5:20 am
Forum: General discussion
Topic: High Speed Serial
Replies: 11
Views: 1461

Re: High Speed Serial

ag123 wrote: Sat Dec 28, 2024 4:44 am for anything more than that, you'd need to try things with stm32f405 etc with an external usb2.0 high speed ulpi transducer 480 Mbps, not directly supported out of stm32duino
I need it for rs485
by DrBanana
Sat Dec 28, 2024 5:06 am
Forum: General discussion
Topic: High Speed Serial
Replies: 11
Views: 1461

Re: High Speed Serial

When using

Code: Select all

Serial3.begin(2500000, SERIAL_8N1);
it writes in 4385 baud rate

Seems like some sort of overflow

Code: Select all

Serial3.begin(1500000, SERIAL_8N1);
1.5M working good

Code: Select all

Serial3.begin(2000000, SERIAL_8N1);
2.0M is having some issues of randomly writing correct values and wrong values
by DrBanana
Sat Dec 28, 2024 4:00 am
Forum: General discussion
Topic: High Speed Serial
Replies: 11
Views: 1461

High Speed Serial

I'm required to use 2.5M speed of Serial and when I use logic analyzer to check its output. It doesn't seem like its working at all. Whats the max speed of Serial STM32F103RE can handle?




Using following to set clock, having 8Mhz crystal.

extern "C" void SystemClock_Config(void) {

RCC ...
by DrBanana
Thu Nov 14, 2024 6:09 pm
Forum: General discussion
Topic: Whats the clock frequency of Generic STM32F103RETx
Replies: 8
Views: 1739

Re: Whats the clock frequency of Generic STM32F103RETx

I've checked with pin output, the method is being called.

Edit : I have checked the baud rate, its working fine now with external clock.
by DrBanana
Thu Nov 14, 2024 5:54 pm
Forum: General discussion
Topic: Whats the clock frequency of Generic STM32F103RETx
Replies: 8
Views: 1739

Re: Whats the clock frequency of Generic STM32F103RETx

I'm using Visual Studio 2022 with visual micro plugin. There is no such option for debugging.

Also the program is reading 1/4 of ADC Voltage, if voltage is 1.0V, the adc is reading it as 0.25V. Is this also because of clock ?

Edit :
I had to call analogReadResolution(12); once in setup to remove ...
by DrBanana
Wed Nov 13, 2024 3:01 pm
Forum: General discussion
Topic: Whats the clock frequency of Generic STM32F103RETx
Replies: 8
Views: 1739

Re: Whats the clock frequency of Generic STM32F103RETx

extern "C" void SystemClock_Config() {
RCC_OscInitTypeDef RCC_OscInitStruct = { 0 };
RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 };

/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC ...
by DrBanana
Wed Nov 13, 2024 9:37 am
Forum: General discussion
Topic: Whats the clock frequency of Generic STM32F103RETx
Replies: 8
Views: 1739

Re: Whats the clock frequency of Generic STM32F103RETx

fpiSTM wrote: Wed Nov 13, 2024 5:14 am Generic uses the HSI.
You can redefine the clock config to use HSE :
https://github.com/stm32duino/Arduino_C ... ock_config
Is there any example how to do it ?

Go to advanced search