Questions tagged [stm32f1]

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

144 questions
1
vote
1 answer

stm32f103c8 jump to application doesn't work

i write a programmer for boot stm32f103c8 by uart when submit app.bin file via MCS bootloader(media uart) and in to stm32f103c8 give successful data and then run app.bin by jumpToApp() function. but jumpToApp() doesn't correctly work . bootloader…
1
vote
1 answer

Built in LED is off when GPIOC13 is high, but on then GPIOC13 is low

I am a very newbie in microcontroller and the embedded world, so I started with trying to code a blinking programme in stm32 using basics registers and all, finally, I got it to blink, but then I found that whenever the pin pc13 is high the built-in…
1
vote
1 answer

STM32F103 PLL comparing reset value with a flag value "CODE WISE"

I am trying to program an STM32f10xx MCU and trying to set the Clock. In the Reference manual It is written that the PLL when turned on, a flag will be set by the hardware indicating that it is ready or LOCKED, The flag bit is called PLLRDY. The…
The_M_Code
  • 127
  • 2
  • 10
1
vote
0 answers

define pointer to array from struct in c

i have tried to access array of registers in stm32f103 MCU by struct method like this: typedef struct { volatile u32 MNVIC_IABR[3]; }MNVIC_IABR_T; #define MNVIC_IABR ((volatile MNVIC_IABR_T*) 0xE000E300) but it gives me error : In file included…
haitham500
  • 11
  • 2
1
vote
1 answer

cmsis_compiler.h: No such file or directory while compiling Arduino Tensorflow lite library for Arduino Due

I am trying to compile the Arduino Tensorflow lite Library example file for Arduino Due board, but at the time of compilation I got error of missing cmsis_compiler.h file error. I also tried to compile the code for STM32F103C8 board on Arduino…
Abdul Rehman
  • 2,224
  • 25
  • 30
1
vote
3 answers

Clearing pending EXTI interrupt in stm32f103

I'm trying to toggle an LED at PC13 by toggling PC14, the problem is that the interrupt handler is kept being called without toggling PC14 and the the pending interrupt is not cleared using EXTI->PR register, nor cleared manually using the debugger.…
0xDEADC0DE
  • 323
  • 3
  • 12
1
vote
2 answers

Load binary into stm32f103c8t6 with OpenOCD and arm-none-eabi-gdb

I tried to load binary that is compiled from rust code, but it doesn't work. First, I downloaded Rust code from https://github.com/rust-embedded/discovery. Then, I built it. # I am in the `src/05-led-roulette` directory rustup target add…
lenna_kun
  • 43
  • 5
1
vote
1 answer

Can bytes be lost when using HAL_UART_Receive_IT() and HAL_UART_RxCpltCallback()?

I have some (mostly CubeMX-generated) code: volatile uint8_t buf[4]; int main(void) { ... HAL_UART_Receive_IT(&huart3, buf, sizeof(buf)); while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /*…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
1
vote
3 answers

what means about "-DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER" as the flags of arm-none-eabi-gcc?

they seems like startup and standard files of stm32 ,but i can not find them in "GCC offical refeence PDF" . why can they be used directly this is the flags of arm-none-eabi-gcc in makefile: # specify compiler flags CFLAGS = -g -O2 -Wall CFLAGS +=…
CHIPPY
  • 97
  • 1
  • 7
1
vote
1 answer

DMA enabled ADC with FreeRTOS

With the DMA continuous requests, the program will just loop in DMA1_Channel1_IRQHandler and the FreeRTOS thread is not running. Does anyone have any idea how to resolve this? { HAL_Init(); /* Configure the system clock */ …
Satyam Miri
  • 33
  • 1
  • 6
1
vote
1 answer

stm32f103c8t6 - Disable all interrupts except one - Timing critical, but interruptable operation

I'm trying to write some code for the stm32f103c8t6 microcontroller. It is constantly communicating with a device, which requires interrupts to be disabled... however, this also needs to be interrupted immediately by the falling-edge of a certain…
1
vote
2 answers

i2c transmission, stm32f103 as a Master, problem with STOP condition generation

I am using KEIL. Here is my code for I2C setup. I am trying to set it up using interrupts. Actually, everything works fine like this. But only problem I have is that I did one strange thing in order for it to work. // Variables passed to…
Vaso
  • 811
  • 6
  • 12
1
vote
1 answer

Not able to read from an external EEPROM using the STM32F103C8

I'm trying to write and read from an external EEPROM. There is a start bit (SB) followed by an opcode, then a 6-bit address and then the actual data. I've combined the SB and opcode into one byte that I can send as a start condition. I'm able to…
electrophile
  • 285
  • 1
  • 5
  • 16
1
vote
1 answer

STM32 HardFault when booted from Flash

I have a simple bare metal program for STM32F103 ARM chip (I use GNU toolchain and openocd debugger). When I run it from RAM it works fine. When I boot chip using preinstalled bootloader and jump straight to Reset_Handler location in flash, it also…
Sergey
  • 1,166
  • 14
  • 27
1
vote
1 answer

IAR Embedded Workbench for ARM - How to define Interrupt Service Routine?

I tried to create an Interrupt Service Routine for the Timer2 Overflow Interrupt like this: #include "stm32f10x.h" /* IRQ definitions in CMSIS startup_stm32f10x */ void TIM2_IRQHandler (void) { TIM2->SR &=~TIM_SR_UIF; GPIOC->ODR |=…
binaryBigInt
  • 1,526
  • 2
  • 18
  • 44
1 2
3
9 10