All Questions
238
questions
0
votes
0
answers
47
views
Unwinding Stack on Cortex-M with FreeRTOS: Handling Interrupts and Stopping Conditions
I am writing an unwinder for a Cortex-M (an ARM processor) running FreeRTOS. It mostly works, and I can trace the stack in many cases, but I have encountered a few issues that I haven't been able to ...
1
vote
1
answer
52
views
How/When exactly does Cortex-M4 (STM32 F4) switch its R13 from MSP to PSP? Do i have to manually switch if using PSP in inline asm?
I'm writing my own RTOS and I'm implementing the context switch function, where I have to use PSP. The function is written in inline assembly
I was working on another project on STM32 F4 writing ...
1
vote
1
answer
103
views
How to correctly implement delay after enabling RCC peripheral clock?
I'm new to STM32 microcontrollers. I would like to know how to correctly implement 2-clock-cycle delay after enabling RCC peripheral clock.
Section 5.2.16 (page# 134) of https://www.st.com/resource/en/...
0
votes
2
answers
47
views
Can I service the SysTick interrupt while already in HSEM interrupt (STM32H745, M4 core)?
I have a situation where my software enters a HSEM interrupt (with the M4 core) and while it is servicing that interrupt it is ignoring the SysTick interrupt. Exiting the HSEM interrupt is dependent ...
0
votes
1
answer
63
views
ARM GCC fails to create a working binary for STM32F4, lot of discarded code
I've been migrating all my STM32 projects to Codeblocks IDE and GCC compiler (arm-none-eabi).
The process is using STM's CubeMX to generate the base code, then merge everything to a proper folder with ...
0
votes
0
answers
42
views
STM32 stall after implementing STOP2 mode. Implementation of a interrupt based keyboard in Nucleo-L412KB
I have implemented a serial keyboard with a Nucleo-L412KB board (bare-metal). The switches are arranged in nine rows (output pins driven high) and seven cols (input pins pulled-down, with interrupts ...
0
votes
0
answers
178
views
STM32G030 refuses write to flash
The microcontroller throws an error when I'm trying to modify its flash.
The memory looks to be unlocked, here is screenshot of option bytes
The microcontroller is soldered into a custom board, with ...
1
vote
2
answers
94
views
VTOR not found in STM32F030
when attempting to jump to the bootloader App code address on an STM32F030 microcontroller . I cannot find the vector table offset register. Can anyone provide guidance on how to successfully perform ...
6
votes
2
answers
226
views
Issue with measuring ARM MCU interrupt latency
Introduction
I am a student who wants to roughly measure the interrupt latency of ARM Cortex-M series chips without using an oscilloscope. However, I have encountered a very peculiar issue that has ...
0
votes
0
answers
142
views
I cant get my thread context switching code to work (ARM procesor)
Im developing a "operating system" on ARM. My context switching code for swapping between tasks is not working.
I have a function demo() which I am calling in main. In this I am creating a &...
0
votes
1
answer
51
views
Why sub instruction modifies the xpsr register and puts a carry flag for 9-7
I'm using STM32cubeIDE and debugging assembly on a cortex m4. I meet a strange behaviour when trying the instruction SUB. according to documentation,the SUB instruction shouldn't change the XPSR ...
0
votes
1
answer
356
views
vscode cortex-debug halt stm32
Hi i wanted to know if there was anyway to stop the program halting when i attach to stm32
launch.json
{
"name": "Attach STM32 STLink",
"showDevDebugOutput": "...
0
votes
0
answers
41
views
STM32F407 CubeIDE
systick is not working.
I have tried to simply enable the systick from its memory register:
uint32_t *pSCSR = (uint32_t*)0xE000E010;
//do some settings
*pSCSR |= ( 1 << 2); //...
5
votes
1
answer
517
views
STM32: Code execution seems to depend on its location in flash memory
I'm noticing a behavior that I cannot explain: the execution time of a function seems to depend on its location in the flash ROM. I am using a STM32F746NGH microcontroller (ARM-cortex M7 based) with ...
0
votes
0
answers
164
views
Why VTOR in stm32 is set `SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET` instead `SCB->VTOR = FLASH_BASE + VECT_TAB_OFFSET`
Why do we use OR instead ADD in this code?
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
SCB->VTOR = FLASH_BASE | ...