176 questions
0
votes
0
answers
64
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
75
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
127
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 ...
2
votes
1
answer
5k
views
Code stuck in the transmitting pending function when programming an STM32 microcontroller with CAN bus
I am new to STM32 microcontrollers and CAN bus communication protocol. I am working on programing an STM32F103xx microcontroller.
I want to use CAN bus for transmitting data to another microcontroller ...
4
votes
0
answers
147
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(&...
13
votes
2
answers
40k
views
How can I use LL (low level) drivers in CubeMX STM32?
I'm creating a blank project for a STM32F103 microcontroller using STM32CubeMX. Using HAL drivers (the default), I got a blinky example working pretty quickly, but I'd like to try out LL (low level) ...
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
70
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 ...
1
vote
2
answers
678
views
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,...
1
vote
1
answer
90
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 ...
3
votes
1
answer
1k
views
Could not set Option bytes! Please reset the target and retry
When I try to remove the Read Out Protection from stm32f103c8t6 I get an error
Could not set Option bytes! Please reset the target and retry.
Сonnect like this:
The problem is not in the controller, ...
2
votes
2
answers
8k
views
How to Use the VREFINT in stm32f103 bluepill?
I'm not able to understand the use of VREFINT in stm32f103 board. Can anyone explain me how to get adc value in stm32f103 using VREFINT?
if(HAL_ADC_PollForConversion(&hadc1, 100) == HAL_OK)
{
...
0
votes
1
answer
78
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
92
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
151
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 ...