Questions tagged [mcu]

89 questions
0
votes
0 answers

STM32 - USB - CDC_Transmit - How to read the data on PC? - Matlab?

I am in the process of programming some sort of USB oscilloscope. I followed the tutorial, using a STM32F429. https://www.youtube.com/watch?v=MmwR1VU_rVc&list=PLnMKNibPkDnHxpOv2HETihQy5HHQGv2nS&index=26 The tutorial was very helpful with this and I…
FMech
  • 1
  • 1
0
votes
1 answer

STM32F7, Bare Metal C, QSPI Indirect Mode Hangs or Writes Same Gibberish

Win 10, STM32CubeIDE 1.8.0 STM32F746 Discovery board MCU: STM32F746 (Datasheet, Reference Manual, Errata) Flash: MT25QL128ABA1EW9-0SIT (Datasheet) Equipment: Low end oscilloscope, low end logic analyzer with decoder What I'm trying to achieve: I…
Ilya
  • 992
  • 7
  • 14
0
votes
0 answers

Since a mcu can boot from an external spi flash, why spi driver is needed to write or read the flash in appliction

As i know, mcu such as stm32f4 can be configured to boot from external spi flash, or sd card. But when we write or read the flash or sd card in application, initialization or configuration driver code must be executed at first. I think since the mcu…
0
votes
1 answer

Incorrect 1ms delay at GD32VF103

I use GD32VF103C_START kit from GigaDevice and try LED blinking sample project. I found this project in the Internet and it compiles just fine (I've only changed from 500ms to 1000ms=1s). main.c: #include "gd32vf103.h" #include…
0
votes
0 answers

Why this MX_RTC_Init() function in STM32F4 make program stuck?

When place this function in main.c,the program get stuck,can't go to the next statement.I tried to add printf("error!")before eachError_Handler();,But nothing appearred in USART ports. If it is removed,the whole program could work. The program…
0
votes
1 answer

How to read the WhoAmI register of an ST-sensor during both initialization of the program (works) and repeatedly during LoRaWAN duty cycle (doesn't)?

I have been trying to program an STM32WL55JC1 microcontroller on a LoRa-E5-Mini from Seeed studio to be a LoRaWAN endnode and relay airpressure data from an ST LPS22HH sensor to The Things Network. I think the problem I seem to be having must be in…
Tembai
  • 1
  • 2
0
votes
1 answer

STM32 with LCD 2004 + I2C, can't communicate

I am using a STM32F030F4P6 MCU and a LCD 2004 with PCF8574T I2C display driver. I have tried the library from this tutorial: https://controllerstech.com/interface-lcd-16x2-with-stm32-without-i2c/. I have found a datasheet for the PCF8574T device,…
Wolfiwolf
  • 35
  • 1
  • 4
0
votes
1 answer

how to calculate the CAN bus baud rate from the Tq and clock frequency ?

first , I think I know how to calculate the CAN bus Baud rate form the parameter in picture blew ,this is a CAN FD config. clock frequency :80000 k pre-scaler :1 so we can get the Tq = 1/80000 K BTL cycles : 40 time for a bit = 40 * (1/80000K) =…
Mcu
  • 11
  • 1
  • 3
0
votes
0 answers

example of inline assembly

I'm writing a C program that takes advantage of what is inline assembly. How do I pass the address of a variable directly to a register? int main(void){ int pos0=0; asm( "ldr r4, =registro_pos0\n" "add r4, #5\n" "str…
Dooraim
  • 51
  • 5
0
votes
1 answer

How to build an MCUXpresso project with github actions?

I have an micro controller (MK22FX512) that I program with MCUXpresso. The project is on GitHub, now I want to build (on PR/PUSH) the project using GitHub Actions. Anybody has experience with that ?
nerohmot
  • 777
  • 6
  • 9
0
votes
0 answers

PIC USART second char always read 2 higher

I am using MPLAB XC8 and I try to use the USART module. But I have abnormal problem. Here is my code, I explain after this. #include #include "conbits.h" #include #include #include #include…
batgre
  • 1
0
votes
0 answers

Bootloader writes in RAM or Flash ROM?

I am trying to understand about secondary bootloader. Let us say we are talking about a specific 32-bit ARM MCU then is it possible to find out whether the secondary bootloader can load a firmware in RAM or is it that it always load and bake the…
Marina
  • 13
  • 4
0
votes
1 answer

__stop_SECTION contains wrong value after compilation

While developing code for STM32 MCU, I'm placing some structures into custom memory section: struct MyStruct structName; __attribute__((__section__("my_section"))) __attribute__((__used__)) const struct MyStruct *const mystruct1 = &x Linker…
VIPPER
  • 326
  • 4
  • 24
0
votes
1 answer

F0520005:Could not open source file "r_bsp_config.h"

i'm working with renesas MCU RX65N, i want to make a serial connection with other board and also display an HMI i designed on Appwizard, i followed the steps they offer on their manuals but won't work either. Then found more information about how to…
0
votes
0 answers

make: *** [Core/Src/subdir.mk:34: Core/Src/main.o] Error 1

I am a newbie for STM32. After activating all my peripheral libraries I try to build my code but I get the following error: make: *** [Core/Src/subdir.mk:34: Core/Src/main.o] Error 1 "make -j4 all" terminated with exit code 2. Build might be…