176 questions
0
votes
0
answers
58
views
Question about PMA Layout and BTABLE Size on STM32F103
I have two possible interpretations of how the USB BTABLE and PMA layout work on the STM32F103.
I will provide two diagrams (Figure A and Figure B) to illustrate the scenario.
STM32F1 USB PMA
Scenario:...
1
vote
0
answers
72
views
I can't figure out why my stm32 spi peripheral is not working
So i am learning the stm32f103c8t6 board, and after having used the hal, i am trying to create my own peripheral driver, but i can't seem to get the spi working, I am trying to communicate with an spi ...
0
votes
1
answer
110
views
Error Could not verify ST device when Debugging code for my Blue Pill board
Created a new STM32 project and made settings below:
HSE: Crystal/Ceramic Resonator
SYS: Debug: Serial Wire
Clock: 72 MHz
Here's the debugger settings on STM32CubeIDE (version 1.19.1) with a simple ...
0
votes
0
answers
40
views
Independent WatchDog Reset Source Not Detected in RCC->CSR Register stm32f103c8t6
I got Problem with Reset Sources in stm32f103c8t6. when an independent watchdog reset occurs, IWD Reset Flag in RCC->CSR (Bit29) is not set!
it works fine with SW and External and Power On Reset ...
2
votes
1
answer
66
views
stm32f103c8t6 timer 1 pwm outputs not working
I'm working on a project that needs 3 pwm outputs. I'm already tried with timer 2,3,4, and they work fine with my library. But I wanted to port my pwm library to timer 1 and now I see that A8, A9, A10 ...
4
votes
0
answers
144
views
stm32 master and slave spi+dma communication
I config stm32 by using cubemx, and try to achieve the funciton to communication between master and slave.
Here is the configuration of cubemx
master
and I directly use HAL_SPI_TransmitReceive_DMA(&...
1
vote
1
answer
88
views
STM32F103C8T6 (Blue Pill) Can't Get the Register Value In First Read From NRF24L01+ via SPI
I have a STM32F103C8T6 Blue Pill board and NRF24L01+ RF module with 5V to 3.3V NRF24 adapter. I wore a code for reading and writing NRF24 register via SPI serial communication. In order to read any ...
0
votes
1
answer
72
views
STM32F103C8T6 i2c never generates start condition
I wanted to create a simple library for i2c, but I stucked in start generation. my code is this:
void i2c_init()
{
gpio_init(GPIOB, 6, GPIO_AFOUT_OPENDRAIN); // Initialize PortB-Pin6 for OpenDrain ...
1
vote
0
answers
91
views
__WFI() does not work as it should in STMCube
I'm programming in C on STM32f103rbT6. I'm using STM32CubeIDE.
For some strange reason, the __WFI function, instead of waiting for an interrupt to occur, automatically calls itself and doesn't wait ...
2
votes
0
answers
147
views
STM32CubeMx doesn't generate whole code for USB
Win10, STM32CubeMx ver. 6.5.0, STM32CubeIDE ver. 1.18.0, MCU - STM32F103C6
I'm creating a new project using either STM32CubeMX or STM32CubeIDE. In the Pinout & Configuration window, I configure ...
0
votes
0
answers
131
views
How to read sector data from 1K mifare card using RC522 and STM32F103C8T6 and display as HID using USB
We purchased a RFID writer and a few readers from a firm. We write a code on the RFID cards using the writer. To write it uses a serial port terminal program called Termite. Encoded data looks ...
0
votes
1
answer
50
views
why PLL not change in STM32f103c8
I have written the following code snippet to set the system clock to 32MHz.
#include "stm32f10x.h"
void SystemClock_Config(void);
int main(void)
{
SystemClock_Config();
while(1){}
...
0
votes
0
answers
69
views
Serial communication problem on stm32f103c8 (Proteus)
i'm learning stm32f103 programming and i tried using the USART1. this is my code but when i test it on proteus it doesn't show anything. i've checked and it seems to not shift the data at all. i use ...
0
votes
1
answer
324
views
HID REPORT is not aligned with the bytes
I'm currently creating a HID device with a STM32 to work with windows, and I struggle a lot with the Report.
I always have an "this device cannot start - error 10, the report is not aligned with ...
0
votes
0
answers
75
views
STM32 freeze at osKernelStart() after jump from bootloader
my stm32f103 freeze after osKernelStart() after jump from bootloader but if I flash at that address it run normally.
I try with blinking LED simple one but it still freeze too.
while (1)
{
...
1
vote
1
answer
115
views
Can windows (HidLibrary.dll) send packet to USB HID (Keyboard + vendor-defined)?
I'm trying to write a usb device by stm32f103c8t6, which is detected as keyboard to send key code to windows, and vendor-defined to send-receive custom data.
But only keyboard work.
Here is usb ...
0
votes
0
answers
64
views
Led blinking with STM32F103RET6
I have a Micro STM32F103RET6 And although I manage to turn on an LED by the PB13, I can not get it to blink, when I remove the call to the function SystemClock_Config(), turn on the LED, it also does ...
0
votes
0
answers
57
views
Can not blink LED connected to Pin A1 STM32F103
I starting to learn stm32 and struggling with this code to blink a LED connected to Pin A1 of STM32F103C8T6.
Can someone help me with this. This is my code:
#include <stm32f10x.h>
void ...
1
vote
1
answer
213
views
FATFS via SPI for NUCLEOF103RB not working, returns FR_NOT_READY (3)
I have been sitting on this problem for a couple of days where I have been trying to use f_mount on a 8GB SD card (I formatted it to FAT32 and to a sector size of 4096.) I am also copying a very ...
2
votes
2
answers
459
views
Writing a program that updates itself at runtime for STM32
I have a program running on an STM32F103C8 that uses a bootloader for USB DFU updates.
The program and the bootloader/updates work nicely, but I wonder how can you a program that updates itself ...
0
votes
0
answers
514
views
STM32: read data in device sent by host over USB HID
In an STM32CubeIDE USB HID project for an STM32F103C8 board I can send data from the device to the host using the USBD_HID_SendReport() function, like so:
USBD_HID_SendReport(&hUsbDeviceFS, (...
0
votes
1
answer
462
views
TouchGFX build for STM32
I get 2 errors when I build target with TouchGFX.
When I build it in STM32CubeIDE there are no errors but when I build the target on TouchGFX this error appeared:
CM7/TouchGFX/target/generated/...
1
vote
0
answers
187
views
Rust STM32 HID mouse not write report
I'm programming a stm32f103C8T6 (Blue pill) using Rust to configure as mouse device However, when I write the report, the mouse does not move and the usb device is not listed by lsusb command at any ...
0
votes
0
answers
95
views
stm32f103 arduino ide how to read pins A0..A7 as single byte?
I'm using STM32F103 in Arduino IDE. I have parallel 8bit data on pins A0..A7, to read them into a byte I use this:
int b = digitalReadFast(PA_0) +
digitalReadFast(PA_1) * 2 +
digitalReadFast(...
0
votes
0
answers
42
views
DMA I2C does not work well in stm32f10x.h
main.h
#include <stm32f10x.h>
static volatile u8 i2c_1_rx_data = 0;
static volatile u8 i2c_1_tx_data = 0;
static void i2c_1_init(void){
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
...
0
votes
2
answers
83
views
I can't program STM32F100RBTx to send pwm signals
I am trying to send PWM signals using STM32F100RBTx but it is not working. I double checked all the addresses but it is still the same. I wasn't sure if I was flashing at the beginning but I ...
0
votes
0
answers
135
views
I am making a 3 axis gimbal using STM32F103C8T6 blue pill, 3 MG996R servos and MPU6050 and I am currently stuck with the MPU6050 acting weird
i used two libraries from Github for I2CDev library and one other for the Mahony algorithm filter. something is wrong here and the values are really weird and they dont seem to get affected much by ...
0
votes
1
answer
134
views
Why does UART1 interrupt does not work in STM32F100 (KEIL)
There is a simple code where an external interrupt from a button sends “1” via USART1, and when zero arrives from the same UART, the LEDs go out. I use KEIL 5 to compile.
#include <stdio.h>
#...
0
votes
2
answers
218
views
STM32F100 PWM with SPL setup
I am trying to figure out what I am doing wrong with my PWM setup on PC6 with my STM32F100 MCU, TIM3 Channel 1.
It is an old project with only one pin left that I am trying to expand a little bit.
My ...
0
votes
1
answer
444
views
Traffic light with STM32
I am designing a traffic light control system with the following description:
When pressing button 1 (name this button rst: reset), the traffic light system immediately goes into control state (...
0
votes
1
answer
228
views
Problem in STM32F103C8 with Timer Interrupt
I am newbie at STM32 and I have a question about the interrupt.
I have wrote below code for STM32F103C8T6 MCU for timer interrupt, but the code in while(1) dosn't run when I active the interrupt with ...
0
votes
1
answer
368
views
How would I read the code from the MCU through CUBE-IDE or CUBE-Programmer?
I have hooked up a STM32F103C8T6 MCU to a programmer and can see some info about it throught the programmer. I was curious on if I could find a way to see the code that is already on it, but not erase ...
0
votes
0
answers
127
views
Why the number of stm32f103c8t6's timers in reference manual differ from datasheet
I'm working with stm32f103c8t6, in the block diagram there are only 4 timers but in the reference manual there are 14 timers (2 advanced control, 10 general purpose, 2 basic), why is that ?
I have ...
1
vote
1
answer
325
views
stm32f103c8t6, pins B3 and B4 doesn't work, CubeIDE, HAL
I did something wrong in CubeIDE and two pins stopped working. (Maybe something else stopped working until I saw it). To check, I created a new project for stm32f103c8t6 and added the following code ...
0
votes
0
answers
376
views
Disabling JTAG PINS on STM32f103RCT6
In my newest project with STM32f103rct6 I have to use all Pins, including JTAG ones. I've checked reference manual, I know I have to deal with AFIO registers. So to completely disable JTAG pins, I ...
0
votes
1
answer
287
views
what is pData in HAL_IM_IC_START_DMA?
I can't understand the pData value meaning when using HAL_IM_IC_START_DMA function
I'm getting started on STM32F103C8T6. When I use Input Capture of timer 2 to measurement the frequency of timer 1 by ...
1
vote
1
answer
472
views
Came up with an "Unable to stat debugging" error when Debug program for STM32 NUCLEOF103RB
I am trying to use STM32 VSC extension plugin on VSCode for a better coding experience, but error occored when I am trying to debugging.
VSCode suggested that build task finish successfully in the ...
0
votes
0
answers
286
views
STM32F103C8T6 Blue Pill Timer2 4-channel PWM config
I'm trying to set TIM2 in PWM mode, but I'm getting weird results.
CH1 to CH4 are enabled but CH3 on PA2 shows no output no matter I do.
The weird thing happens when I try to remap TIM2. There are ...
-1
votes
2
answers
537
views
STM32f103c8 blue pill GPIO driver configuration
I want to create my own driver on stm32f1 board. I want to control MCU build_in led but I can't solve. I am trying to make PortC pin 13 pin as output (push-pull) mode, after that I want to set bit. ...
0
votes
2
answers
1k
views
PlatformIO compiling error: Not finding map file (STM32)
I want to flash an old STM32 F103CB based flight controller with a simple led blinking program, But I can't get it to work. I get this error:
c:/.platformio/packages/toolchain-gccarmnoneeabi/bin/../...
1
vote
0
answers
498
views
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 ...
0
votes
0
answers
52
views
Why does the stm32f103 serial port in freertos not enter the interrupt when I use it to interrupt receiving data?
I had no problem using the serial port interrupt to receive data in bare metal, but when I ported this code to freertos, The interrupt channel is changed from USART1_IRQn to USART1_IRQChannel (because ...
0
votes
1
answer
1k
views
STM32 proteus simulation doesn't work properly
guys I'm making a simulation for stm32f103c6 the code written on Arduino IDE. I'm testing a simple LED blink on proteus and it's not even working.
Arduino Code
And this is what happens when I run the ...
0
votes
1
answer
318
views
stm32 - Access to register of unclocked peripheral at 0x40010C10 cause BUS_FAULT [U1_CM3CORE]
I'm working with STM32F103R6, tried to simulate blinking an LED but when I start the simulation Proteus 8 freezes and I got 9706 error messages "Access to register of unclocked peripheral at ...
0
votes
0
answers
170
views
Stm32f103c8 LEDs blinking using Systick (Registres Programming)
I have an STM32f103c8 with 8Mhz SystemClock i configured My Systick to make delay every 1 seconde , i have a Button Connected to PA1 (Input Pull up) and Two Leds PB8 and PB9 i want when i press first ...
1
vote
1
answer
1k
views
Why doesn't my PC recognize STM32 as USB Device when sending data to it through USB?
I want to send Data through USB from STM32. I've written the following bare-metal code to do it. But my PC doesn't recognize USB device when plugged in.
#include "stm32f10x.h"
void ...
0
votes
1
answer
2k
views
How can I get an STM32F103C8 running at 72MHz with ArduinoIDE and HAL library?
How can we get an Stm32f103c8 running 72MHz with Arduino IDE (STM32duino)?
We have custom designed a PCB using the chip from the question. We are able to get it running at 72MHz using STM32CubeIDE. ...
0
votes
1
answer
602
views
How to trigger RTC global interrupt on stm32f103 blue pill
I am trying to use the RTC global interrupt for the stm32f103c8t6, but I have had no luck.
I am not sure if this is an issue with my configuration, or if the RTC global interrupt handler is not used ...
0
votes
1
answer
3k
views
How trigge stm32 one pulse mode timer internally
I've used the stm32 one pule mode timer to generate pulse train. one pulse mode generate the pulse train in response of a extranl event originally, but i want to know that is there anyway to trigger ...
0
votes
2
answers
464
views
STM32F103 - Option Bytes 2nd bit wrong when programming
I am trying to write a piece of data to the option byte at 0x1FFFF804. If the data I want programming is 0x08AE the data written is 0x51AE. Note this is on a copy of an STM32F103 (a MindMotion ...