Questions tagged [stm32f103c8t6]

34 questions
13
votes
6 answers

Why not always use DMA in favor of interrupts with UART on STM32?

I spend last month a lot of time getting UART (for MIDI) to work with an STM (STM32F103C8T6) using interrupts, without very much success. However, this evening using DMA it worked quite fast. Since as far as I read DMA is faster and relieves the…
Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
7
votes
4 answers

Do I really need to put stm32 microcontroller into bootloader mode to program it?

I have started learning stm32 microcontroller for a while using a very small development board "stm32f103c8t6" (or blue pill). when I started, I learnt from some tutorials that I have to switch a jumper in order to program it. (The photo is a…
iMohaned
  • 1,491
  • 5
  • 24
  • 44
4
votes
2 answers

STM32 SPI not working as I expect it should based on online reading

I am using an STM32F103C8 to connect to a Hope RF95W transceiver IC for the purpose of learning. I am only trying to read the chip version register, then write a config register that has a 0x00 reset value and then read it to make sure my write code…
Sam Hammamy
  • 251
  • 3
  • 9
3
votes
3 answers

STM32 print via UART without Nucleo/Discovery

I would like for debugging/trace purposes to print texts (preferably via printf but just text is also fine) from an STM32F103C8T6 to a (PC) terminal application. I noticed that all examples use a Nucleo or Discovery board but I don't have those. I'm…
Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
2
votes
1 answer

Current sinking with PC13 on STM32F103C8T6

I recently started playing around with a "Blue Pill" board that uses the STM32F103 MCU. The board has an onboard user LED, that is driven by sinking current into the PC13 pin. This is done because the PC13 pin should not be used for sourcing current…
2
votes
2 answers

Trouble getting I2C working on STM32 (stm32f103c8t6)

I'm starting out with I2C. I have a development board with stm32f103c8t6 to which I have connected GY-68 board with BMP180 barometric pressure sensor. Documentation of BMP180 describes Chip-id register [0xD0] which holds a constant value of [0x55]…
xstmpx
  • 155
  • 6
2
votes
1 answer

Analog Vref for ADC on STM's Blue-Pill

I am piecing together my own ADC example for STM's blue-pill module by reading the reference manual (btw I an inexperienced in embedded development). The code outline so far is: void do_adc(void) { unsigned int ra; ra=GET32(ADC_CR2); …
Sam Hammamy
  • 251
  • 3
  • 9
1
vote
3 answers

STM32F103 PC13 on Output mode not work

I using STM32F103C8, I want to use PC13 in GPIO mode (RTC is active). The register ODR13 changes, but the logical value of the PIN does not change. static void MX_GPIO_Init(void) { GPIO_InitTypeDef GPIO_InitStruct; /* GPIO Ports Clock…
Hamed
  • 117
  • 1
  • 6
1
vote
2 answers

How can I connect a shunt resistor whose output voltage range is 5V to STM32F103 whose ADC conversion range is 3.6V?

I am new to STM32F103. I need to connect a shunt current measurement sensor whose output voltage range is 5V to the ADC pin of STM32F103. But the ADC conversion range of STM32 is 3.6V. What is the solution so that I can get proper output from the…
Jackie
  • 11
  • 3
1
vote
1 answer

stm32f103c8t6 cannot connect using stlink after upgrade, how to fix?

I upgraded the firmware using stlink>upgrade firmware (using cheap stlink v2) with stm32f103c8t6 connected (boot0 and boot1 are both 0). After successful upgrade i unplugged and plugged it back and then i can no longer connect to the stm32f103c8t6…
Amrith
  • 123
  • 10
1
vote
2 answers

Questions about DMX512 protocol/STM

I want to make a DMX512 transmitter with a STM32F103 using HAL, CubeMX. I found some documentation like here about the protocol: Lighting-Control-using-DMX512-protocol-on-STM32. Sadly it does not show code, however, I have some questions about the…
Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
1
vote
0 answers

driving WS2812B using DMA and timers

I am trying to port the octoWS2811 for STM32F103c8T6. This guy hubmartin has already done the heavy lifting and created a library using STM32 HAL. But the problem is that i am unable to get it to work. I am using Eclipse IDE. this is the github…
1
vote
1 answer

STM32 pulled up GPIO pins work stange after being connected to the ground

I use stm32_smart v2 development board and try make a cheap and reliable 7 bit input interface using 7 jumpers from GPIO to the ground. Internal pull up resistors are used. The first time I did not connect any GPIO to the ground and had 3.3V on…
user54041
  • 15
  • 3
1
vote
2 answers

Ticks / nanosecond delay

On an STM32F103C8T6 (72MHz) I want to use a delay in range of 100's of nanosecond (to create a LED strip driver, WS2813B). Since HAL only provides a ms delay, I found at various places code to use the ticks/debug counter as timer. I have the code…
Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
1
vote
1 answer

How to add external GPIO interrupts on STM32?

I'm trying to configure STM32CubeMx to external GPIO interrupts, however, in the NVIC screen I don't see an EXTI... interrupt to be set. What should I do to be able to e.g. check for interrupts on GPIO pin PB14, PB13 and PB12?
Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
1
2 3