Questions tagged [stm32f1]

STM32 F1 are entry-level ARM Cortex-M3 MCUs from ST Microelectronics.

144 questions
2
votes
3 answers

Openocd Error: invalid command name "dap" - can't connect Blue Pill via ST-Link/V2

I'm using a Blue Pill board (STM32F103CB with 128kB of flash according to st-info --probe) via a clone ST-Link/V2 like this one. I've also tested using a genuine ST-Link/V2 like this one. I get the same result, described below, with both…
Spod
  • 21
  • 1
  • 3
2
votes
0 answers

stm32f103: Force DMA transfer complete interrupt

I'm trying to implement communication between stm32f103 and SIM900A using FreeRTOS (mutexes and stream buffers), DMA and USART3. I've enabled USART_IT_IDLE USART3 interrupt to be able to detect end of SIM900 transmittion and make force firing of DMA…
2
votes
4 answers

STM32 code uploads successfully but doesn't run

I'm new to STM32 and I followed the instructions here in order to program my first stm32f103c8t6 board in Ubuntu. Here is the code which I added to the source code: int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU…
Yashar
  • 2,455
  • 3
  • 25
  • 31
2
votes
0 answers

RS485 doesn't receive data

I have some nodes that are connected to a server with RS485. I use stm32f103 microcontroller with MAX485 in nodes. We use modebus connection. The driver is connected to a nano pi m3 as server. The baudrate is 115200. The problem is that sometimes…
N. Parsa
  • 21
  • 1
1
vote
0 answers

Cannot access STM32F103 device with stlink

I'm trying to access a STM32F103 device, via a ST-Link V2 programmer, using st-link but I am not able to do so. More specifically, when I connect the ST-Link V2 programmer in my usb port the device starts flashing (hopefully, that means the wiring…
Sidisyom
  • 163
  • 5
1
vote
1 answer

SPI: SPI: TXE is not cleared when I transmit data

void SPI_SendData(SPI_RegDef_t *pSPIx ,uint8_t *pTxBuffer,uint32_t len) { while(len > 0) { // 1. chờ cờ TXE set (chờ cho thanh txbuffer trống) while (SPI_GetFlagStatus(pSPIx, SPI_FLAG_TXE) == FLAG_RESET); //2. kiểm…
metisai02
  • 11
  • 5
1
vote
0 answers

I2C Issue in Stm32CubeIDE 1.10.1

I'm using the HAL libraries to program my STM32f103RBT6 board to interface with the Aardvark's I2C/SPI host adaptor. I'm currently using the I2C stack and I have written the following code to compare the data that I have sent and what I have…
1
vote
1 answer

ST-Link V2 -- detected as USB mass storage device

I have a "STM32VLDISCOVERY" board (link) that I connected to my Windows PC. This board has an integrated "ST-Link V2" programmer / debugger based on the "STM32F103C8" micro controller which actually communicates with the PC. But this micro…
71GA
  • 1,132
  • 6
  • 36
  • 69
1
vote
1 answer

Has anyone had success debugging a MikroE EasyMx board using the STM32CubeIDE?

I have recently bought a MikroE EasyMx Pro v7 board for the STM32 MCU, however, the compiler which MikroE uses for Arm Development is their proprietary MikroC compiler, which has hardly any tutorials on it. I was wondering if anyone has successfully…
lurence
  • 45
  • 6
1
vote
1 answer

How to send int using UART from HC-06 to stm32f103?

I have connect my HC-06 to pc using bluetooth, so i am able to send data to HC-06. My work is to send any int I typed in PC to the bluepill (which will then display the value in another screen). I am doing this using union concept. typedef union…
wps
  • 39
  • 5
1
vote
1 answer

Problem configuring the GPIO on STM32F103 using assembly

My objective is to write bare metal assembly code for STM32F103 that turns PB1 LED on.
ussrback
  • 491
  • 2
  • 8
  • 22
1
vote
1 answer

How to get file names using FatFs?

I did not the understand how to get file names in SD card using FATFS. I am able to read and write .txt files with this code below: if (f_mount(&fatfs, SDPath, 1) == FR_OK) { /* Write Test */ res = f_open(&file, (const TCHAR*)"TESTTEST.TXT",…
daaarwiin
  • 127
  • 1
  • 13
1
vote
2 answers

Why does UART keep continuing to write my 25 byte buffer which byte it left off?

I have an interrupt (RXNE) based receive cycle running on STM32F1. I do only use receive command which is: HAL_UART_Receive_IT(&huart3, RxBuffer, sizeof(RxBuffer)); Thus I receive a message then write my buffer which is: uint8_t…
daaarwiin
  • 127
  • 1
  • 13
1
vote
1 answer

Can option bytes be used to permanently store user data in the internal flash memory of a STM32 microcontroller?

I'm using a STM32F103C8 microcontroller. According to the STM32F10xxx flash memory programming manual (p.20) there are 2 option bytes which can be used to store user data. These bytes are called Data0 and Data1 and they are stored at address 0x1FFF…
lukas
  • 11
  • 2
1
vote
1 answer

Cannot connect to target : STlink V3 not connecting to Nucleo Board using SWD

I am using STLink V3 set to program the F103RB Nucleo board using SWDIO interface. The board works fine when connected to PC using the on-board STlink debugger but when I use external STlink device to program it, it says "Can not connect to…
No Man
  • 113
  • 6
1
2
3
9 10