Questions tagged [mcu]
89 questions
4
votes
3 answers
Copy larger size variable unit16 to equivalent smaller array size unint8 by casting in c
I have variable uint16_t value, I want to copy it to uint8_t buffer[3]. Is it possible to do (Little endian):
*buffer=*(uint8_t *)&value;
Instead of:
buffer[0] = highByte(value);
buffer[1] = lowByte(value);
Since this replacement cause stm32f7 I2C…

mohammadsdtmnd
- 330
- 1
- 11
3
votes
1 answer
Hard fault RP2040 pico Zephyr
I'm using RP2040 under Zephyr and MCUboot. The final goal is to be able to update the firmware using MCUMGR over an UART bus. MCUboot use A/B seamless (dual slot memory) method to provide a safe update algorithm. When device reboot, MCUboot check if…

Thisora
- 51
- 4
3
votes
2 answers
How to crosscompile GSL for Arm Cortex M4?
I am using a STM32 MCU with arm cortex m4 and want to use the gsl-2.7.1. However, I already tried for example the command ./configure --prefix=/home/user_name/gsl_arm --target=arm-none-eabi and every other suggestion that I could find on the…

bilaljo
- 358
- 1
- 6
- 13
2
votes
0 answers
TFTP client error when trying to open the requested file
I have already posted my question on NXP comunity forum but the team says that LWIP is open source and not related to NXP. which I agree.
I have the following scenario :
PC will run a TFTP server containing all SW files
MCU will run a TFTP client…

lily amazon
- 41
- 2
2
votes
1 answer
Does go supports in MCU?
I have explored, does Go support on Micro Controller Unit. Got some info that is TinyGo. Have doubt is TinyGo equivalent to Golang which support in Linux.

rakesh malepu
- 31
- 4
2
votes
3 answers
Configurations variables removed by compiler
I am attempting to define a set of global variables which will configure my device, about 10 in a dedicated .c file, that will be changed on a regular basis at compile time (as per device requirements), I want these to be in this separate file so…

Josh Gudgin
- 66
- 6
2
votes
0 answers
Union in bit field for mcu register mapping in C++
I have been developing software drivers for the hw peripherals implemented in the field programmable gate array on this platform. I have been using C++ programming language and arm-none-eabi-gcc compiler.
One of the peripherals has following…

L3sek
- 211
- 3
- 8
1
vote
1 answer
STM32 ADC Offset voltage problem. ADC starts from 0.05V instead of 0V
I am working with STM32H743ZI for GPIO, I2C, SPI, ADC. I want to read analog voltage from 8 different channel of ADC1. My code works properly, but there is offset voltage that i dont want to.
I am reading the ADC value by connecting the voltage I…

Kaan Kurtça
- 21
- 1
1
vote
0 answers
Question about Peripheral Timing Generator (PTG) Module on dsPIC33CK256MP508
I am a newbie to programming in the Microchip PIC environment, so please excuse my naivete! I recently began experimenting with the dsPIC33CK Curiosity dev board (which contains the dsPIC33CK256MP508 dsp/mcu at its core), and have been exploring…

benjamin_sadler
- 53
- 1
- 5
1
vote
1 answer
stm32: PWM generator with 1/20 pulses
I'm struggeling on setting up a STM32-F429ZI MCU (Nucleo 144 board) to generate following PWM pattern:
First channel with a variable frequency and 50% duty cycle - at least I've got this working -
Second channel giving a pulse with each 20th pulse…

NativeMode
- 13
- 2
1
vote
0 answers
STM32- RTOS -Task Notify From ISR
I want to notify my task to run from an ISR. I red the RTOS docs but I could not do it. I would really appreciate if you tell me what I am supposed to do and give an example if it is possible. I used cmsis-V2.
Inside the ISR which I am sure the ISR…

Sina_Torkzadeh
- 13
- 4
1
vote
0 answers
How to setup stop condition on VEML7700 through I2C library? I am not getting the ACK from reading
int I2C_Master_ReadReg(unsigned char dev_addr, unsigned char reg_addr, unsigned char count, unsigned char *pData, void (* Sub)(void)) {
uint8_t cnt;
start();
sda(dev_addr);
if (!(dev_addr == 0x10)) {
cnt = 0;
…

NoUdemy
- 11
- 1
1
vote
1 answer
MCUxpresso imr rt - Position Independent Code result in mem fault on free rtos task activation
I have a dev board (imx rt 1024) from nxp, which I write software for using MCUxpresso (nxp's IDE). For my project, I am asked to introduce position independent code (PIC), which, long story short, saves us seconds of downtime when installing a…

bas
- 13,550
- 20
- 69
- 146
1
vote
1 answer
How to understand the return value of uxtaskgetstackhighlwatermark()
According to the official doc :
"uxTaskGetStackHighWaterMark() is used to query how close a task has come to overflowing the stack space allocated to it."
I'm using rtl8720, a 32-bits chip running…

ZH.sd
- 83
- 1
- 9
1
vote
0 answers
Eclipse "compare with" context menus with mercurial eclipse
I have been using the Mercurial Eclipse for MCU projects in System Workbench for STM32 IDE for a while. It allowed me to right click on a file or folder and use the compare with option in the context menu to compare against other file versions from…

jdbk
- 41
- 2