Best way (site) to learn stm32f103c8t6 arduino coding

Hi all, I'm new to the arduino environment I want to code my bluepill using arduino somehow I started with blinking program and I succeeded but I didn't find much sources to deep dive into core components like UART, I2C, SPI so please help me by providing a useful source
Thanks in-advance

OK
Click here

Which core are you using? There are several cores for STM32F1.

Hi @McrioBahner
I'm using STM32F103C8T6 (ARM COTEX-M3 core)

I was talking about the Arduino core that you use. The software that you installed via boards manager.

http://dan.drown.org/stm32duino/package_STM32duino_index.json

If you want to do a deep dive, look at the source code. I am not sure which core that is because you only gave us a download link, but for most such cores, the source code is online and usually hosted on Github. Sometimes elsewhere but the main page for the core will steer you there.

May I assume that you have spent some quality time with the data sheet?

Secondly, most cores have example sketches available in the pull down sketch file menus, after you install the core. There are examples there that exercise the "core components like UART, I2C, SPI" you are interested in.

This is a reference to the "Roger Clark" Arduino/Bluepill etc. core.

This is quite a good, quick introduction to Arduino and the Bluepill :

That's the coe of Roger Clark. There is also a wiki for this core.

Oh, good, that's probably the best alternative to the STM core. Only, it has no support from Roger any more, AFAIK.

I used it extensively, it also has the kind of example sketches that I referred to... but the documentation is scant. In my opinion, it's not a place to go an learn about the workings... the problem is that the original Maple core is a labyrinth of mostly undocumented code (gloves off - it's a nightmare!). It took me several days just to understand the basics of the directory structure (which the code depends heavily on). Even then, I found I often struggled with finding all the places to make changes when attempting to modify a function (I added the existing hardware calibration capability to the RTC code). It's the exact opposite of beginner friendly. There is little to no internal documentation, and same goes for external documentation (of anything that isn't almost trivial).

The forum that dealt with it (deprecated), was populated by helpful and clever people who answered a lot of questions. Without that, it would be really tough to work with. Edit - look like it might be back in business:
https://www.stm32duino.com/

It doesn't help that the IC is a complicated one, for example you have to enable/disable bus domains in order to access different peripherals and different areas of memory.

In theory, if you're using Arduino, you don't bother learning about the stm32f103 spi/i2c/uart components; you just use the Arduino C++ Library functions and APIs (SPI, Wire, Serial) that are approximately the same across all Arduino-supported boards, regardless of processor (cf "Abstraction.")

In reality, sometimes a particular chip family lags behind or has special features that you'd want to access, and you have to delve deeper into chip-specific documentation. :frowning:

I don't know exactly where STM32 fits on that spectrum (for either core...)

The core features UART, I2C, SPI on the STM do not differ very much at all from those on other platforms. So almost any STM core drives them in a very standard way. The only reason for a deep dive on those would normally just be for educational purposes.

If you want to talk about ARM features, DMA, the crossbar matrix, timers, etc etc, these are not typically supported by an Arduino core except in the background as they may be needed to implement standard Arduino core functions.

The 103 and higher chips near to it in that family, do have an amazing number of capabilities - for example hardware crypto and true random number generators. You would have to deep dive to use them.

Actually they have some almost trivial features that many Arduininans could use, such as on board RTC, and sometimes battery backed up RAM. I definitely use the RTC, the RAM could solve the problems of people who need non-volative storage that doesn't have a limit on write cycles. It's a pity that they're not better supported in more than one core...

Some of the timers on the F4 have the ability to link to a DAC for automatic waveform generation with no processor intervention. How cool is that?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.