Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cortex-m]

Cortex-M is a series of ARM processor cores intended for microcontroller applications. ARM licenses the design to third-party chip manufacturers and does not manufacture devices themselves. They are promoted as being suitable for low-power / cost sensitive applications that still need high performance.

12
votes
2answers
2k views

How does an ARM MCU run faster than the external crystal?

So before this I only worked with simple 8 bit Atmel MCUs and I realized on my development board schematics it has only a 12Mhz crystal, yet the MCU operates at up to 100MHz. (I think the default is ...
1
vote
0answers
29 views

OpenOCD flash writing failure with STM32L071C8 MCU

I have designed custom-made PCB with STM32L071C8 MCU. I'm using OpenOCD 'master' branch and SWD interface via FT2232H to debug the MCU. I successfully did some RAM reading and Flash writing, erasing ...
0
votes
0answers
41 views

CORTEX-M LPCOPEN USB-VCOM basics - proper way to build a simple FSM

I'm working on a project involving the LPC4370 mcu (LPC link 2 eval board) and Matlab. I need my embedded code to be user-reconfigurable from matlab: the user sends a command, the mcu replies. I'm ...
0
votes
0answers
30 views

openocd with NUCLEO-F756ZG and linker script for compiler

I am a beginner in arm cortex m7, i bought NUCLEO-F756ZG board and when i was trying to apply this tutorial i faced two difficulties. First: i didn't find linker script for my board (NUCLEO-F756ZG) ...
1
vote
1answer
47 views

ARM Cortex behavior on erased flash

After erasing the flash of a typical microcontroller with an ARM Cortex, I assume the flash contents to be all ff. What is the behavior of the microcontroller ...
0
votes
3answers
111 views

Embedded Architecture [closed]

The most common idea on 'new age' embedded devices - IoT Devices is using an Arm Cortex (Mostly M Series) processor as Central Unit and some Sensors and Peripherals for acquiring data and metrics (...
2
votes
1answer
61 views

Can I leave SWO/TDO and TDI of J-Link floating?

I'm designing a board with cortex-m4f having only SWDIO and SWCLK. I'm drawing schematics for J-Link's 9-pin JTAG/SWD connector, and I wonder if I can leave the SWO/TDO and TDI pins floating. J-Link'...
1
vote
1answer
135 views

STM32L0: Fast processing of an analog sinusoidal signal

I have an embedded system based on a STM32 ARM Cortex M0+ microcontroller (STM32L051K6) and want to use it to convert an analog sinusoidal input signal into a digital pulse signal and do some SW ...
0
votes
2answers
2k views

STM32H7 with 512MB SDRAM

I'm considering to design an audio processor based on the STM32H7. I want to experiment with MCU-based DSP instead of using a dedicated DSP. I chose this high-end ARM MCU to have ample headroom for ...
0
votes
1answer
172 views

Understanding atomic writes to GPIO on different ARM Cortex-M's

This video succinctly describes why the read/modify/store has potential problems when it comes to interrupts. Very clear and understandable. He uses the TI Stelarris Cortex-M4 as a teaching board ...
1
vote
1answer
109 views

SWD AHB-AP access gives ACK_FAULT

When attempting to debug a STM32L471RGT6 chip over SWD, I encounter an ACK_FAULT whenever sending an AP request to halt the core. I've implemented the following sequences which all work correctly, ...
0
votes
3answers
77 views

STM32F4 executable stack?

Is the stack executable on the STM32F4 MCU? I want to do this: ...
0
votes
1answer
208 views

Range of the write protection registers on STM32 (WRP1AR etc)

I want to enable write protection on the flash pages occupied by the bootloader on an STM32L4 chip. I understand I must set the WRP1AR register to 0xFFXXFFYY where XX is the end page and YY is the ...
-1
votes
1answer
556 views

STM32L0 GPIO Interrupt problem

I am trying to blink the led(PA5) when PC13 Button is clicked. But it doesnot work. main.c ...
0
votes
1answer
915 views

STM32F303 code gets stuck in SysTick Exception Handler

I am working with a STM32F303 microcontroller with a Nucleo board and my code gets stuck in the SysTick_Handler routine of the startup_stm32f303xe.s file. (My code ...
1
vote
2answers
62 views

Changing pin direction without glitching on LPC800

I'm looking at an LPC812 Cortex M0+ microcontroller and its GPIO functions. On a PIC microcontroller, one would always set the LATch prior to changing the direction of a given pin. This avoids the ...
0
votes
1answer
67 views

Does ST have a separate Cortex M4F series or are its M4 parts essentially M4Fs?

ST's website does not use the term M4F. Also there is no filter for Hardware Floating Point Unit in parametric search so I guess ST includes floating point unit in all M4 parts.
1
vote
1answer
171 views

Strategy for Cortex M0 Peripheral Clock Speeds?

I'm starting on learning the Cortex M, and coming from an 8 bit background. I've got my demo board, blinking an LED and getting a working project out of STM32Cube. I'm working my way through the ...
5
votes
1answer
1k views

Significance of ARM SysTick Timer vs. Other Timers?

I'm coming from 8 bit MCUs, and I've used a system timer to generate a periodic interrupt that seems to be the motivation behind the Cortex M SysTick timer? Is there some kind of architectural ...
2
votes
2answers
615 views

SDRAM structure for Cortex-M7

I'm looking into designing a custom board based on a Microchip / ATMEL SAM S70 or STM32F7 / STM32H7. The SAMS S70 appears to be the cheapest option and offers roughly the same as the ST competitors. ...
4
votes
2answers
603 views

Can the ARM processor be switched to unprivileged mode inside handler mode?

In the ARM documentation it is stated that: The processor supports two operation modes, Thread mode and Handler mode. Thread mode is entered on reset and normally on return from an exception. ...
2
votes
1answer
2k views

How does the BSRR register work?

On the GPIOs of some ARM-based microcontrollers, you are given a register BSRR which you can write to to perform atomic changes in a ports output register. For ...
6
votes
3answers
946 views

ARM Cortex M0+ CoreMark Ratings

Currently when I work with microcontrollers, I use Microchip PICs and I'm happy enough with them. However, I decided to just take a look at ARM for a possible upcoming project. I wanted the pick the ...
6
votes
2answers
662 views

Mysterious hard-fault when I step over

This question was rewritten to remove several updates and improve clarity. I have a Cortex M3 based (and rather obscure) MCU. I have a rather big project, written in C++, in Keil MDK5 with armcc ...
3
votes
1answer
560 views

Unused GPIO pins shall be configured as pull up or pull down [closed]

I have recently started working on Embedded Systems. I am configuring GPIO pins for MCU. But I'm bit confuzed whether I should configure them pull up or pull down. Is there any configuration rule to ...
-1
votes
1answer
223 views

Why choose an 8bit over a 32bit MCU [closed]

With the recent Cortex-M rage, there seems to be a lot of 8bit bashing going around. I was wondering what specific use cases engineers encountered where 8bit MCUs were the preferred choice over 32bit,...
1
vote
2answers
589 views

GPIO Access on Cortex-M4 : Read-Modify-Write vs Atomic

I recently came across the Bit-banding feature on Cortex-M4 core and how it provides a solution to avoid race-conditions while toggling bits of registers. The M4 also has a dedicated BSRR register for ...
1
vote
0answers
166 views

Can Hardfault Exception be triggered by hardware?

I have an Cortex-M7 project that sometimes goes in the Hardfault exception interrupt, sometimes not. With the same code. When it happens it append all the time. My system is made of two board ...
1
vote
3answers
1k views

Using an MCU with built-in CAN controller vs. external CAN controller

I'm planning to use the Atmel ATSAMC21J18A microcontroller in an automation project which has a built-in CAN controller. The CAN bus network may contain 32 devices, each generating data packets in 1 ...
5
votes
1answer
249 views

Is there a way to check if semihosting is enabled at runtime

The ARM Cortex cores has a built-in feature called semihosting which is a way to interact with the attached debugger, for example to do printf() debugging without using a peripheral unit. However, ...
3
votes
1answer
390 views

Timer problem on STM32F7 - erratic behavior

First off I'm a complete n00b and just getting started with STM32. I'm encountering some weird behavior while setting up TIM1 and also using external interrupt EXTI3. I'm attempting to measure a low ...
3
votes
3answers
7k views

Finding the source of a Hard Fault using extended HardFault_Handler

I have been hitting some hard-faults on the firmware I have created with FreeRTOS on a SAMD21 (ARM Cortex-M0) MCU. So I took a further action to find out the cause and eventually bumped into this ...
0
votes
1answer
201 views

Do I need extra components for SAI with PCM?

I'm in the very early stages of designing a low cost audio device. I will be using PCM (probably 16-bit 44.1khz) audio. I haven't settled on a microcontroller yet, but the stm32f74 arm cortex m7 looks ...
0
votes
1answer
2k views

STM32F072C8 - USB communication issue

I am trying to use the built-it USB to implement a simple HID device in STM32F072. Of course, it is not working. This is my first experience with USB, so I needed some help in figuring out what could ...
0
votes
3answers
146 views

AVR Microcontroller board capacitor recommendations

I am designing SAME70 board with space quite limited, using LFBGA-144 package. According to datasheet it is recommended to place decoupling capacitor nearest to the concerned pin. Due to space ...
4
votes
2answers
951 views

Atmel SAM E70 (ATSAME70Q21, Cortex-M7) battery backup

I'm building a USB-powered demo board with the Atmel SAM E70 controller, and a single hurdle I'm facing is the battery-powered operation. I intend to use a simple 3V coin cell battery as a backup ...
1
vote
0answers
219 views

How can I use an ARM chip to read & write 4164 DRAM?

I have an idea I'd like to pursue and partly because of their speed and partly because I'd like to begin ARM development I think a Cortex based board might be a good fit. I'm quite a proficient ...
1
vote
1answer
414 views

What ISA is used by Cortex-M/R/A and what compilers are available? [closed]

What ISA is used by Cortex-M/R/A? What is the difference between arm-none-eabi and arm-elf-gcc? Are there any other compilers for ARM devices worth mentioning?
0
votes
3answers
705 views

What APIs for Cortex-M (STM32) are commonly used? [closed]

I'm interested in what software packs are commonly used in industry for ARM Cortex-M. E.g which of them are actually used in real projects. How common is it to write one's own API and what does such ...
1
vote
0answers
250 views

What do ARM revisions mean? e.g. r2p1

Questions What do the "revisions" mean in the processor documentation at the ARM Information Center? Do they refer to silicon processor core design revisions, documentation revisions, or something ...
4
votes
1answer
419 views

How does gnu linker obtain Cortex-M stack pointer value?

GNU's linker obtains the ARM Cortex's stack pointer value from the linker script, and places that value in the first location of the interrupt vector table. I note that most of my scripts use the ...
0
votes
2answers
370 views

Arm Cortex-M Programming [closed]

Personally, I have experience on 8-bit and 16-bit architectures (such as Atmel or Microchip) and now I would like to continue with 32-bit ARM Cortex-M family. I wanted to learn the internals of Cortex-...
2
votes
1answer
532 views

STM32 handmade USART driver

I designed a new electronic card which has a STM32F4 microcontroller on it. Each peripheral except the Wifi module works. Wifi module is supposed to communicate with the controller via USART channel ...
0
votes
2answers
136 views

multi microcontrolers and one ram for use like a circular buffer for intercomunication, how do and select?

I'm studying the development of a hardware composed of modules, I initially thought of a serial bus like ICSP, I2C or even CAM to communicate between modules, but I wonder if it could not use a ram in ...
3
votes
2answers
501 views

Programming SRAM over SWD

I'm attempting to program a Cortex M3 based microcontroller over SWD, more or less from first principles. I've written an SWD interface library and have it running on a second micro. I've largely ...
1
vote
2answers
1k views

SPI Transfer with STM32F4 board gets stuck on SPI_WaitTX

I am new to the whole embedded hardware thing, and I am getting stuck when trying to connect my STM32F4 Discovery board to a Bosch BMX_055 IMU unit. Here is a snippet of the code I am trying to run: ...
3
votes
3answers
1k views

STM32 non floating point unit chips

I would like to know how STM32F2 chips and below that doesn't handle floating point unit, perform float operation. I read here, it mentions that the floating point is handled by library functions, ...
-2
votes
1answer
2k views

How do I go about putting uCLinux on a cortex M7? [closed]

I would like to be able to run uCLinux on a cortex M7 board, but don't know where to start. I've searched the net and found a video demo of somebody who got it to work but no tutorials or anything.
-2
votes
2answers
4k views

STM32L4 USART problem

I tried to develop an USART example on stm32L476 discovery kit, but I've got some problems with the HAL driver-s, I think I'm using wrong USART interface Clock enable, and USART GPIO Clock enable ...
0
votes
2answers
301 views

Fill ROM with jump instructions

As I have heard it is a common practice to fill the unused flash memory of a microcontroller with an jump instruction to the reset function. This aids in resetting the MCU in case of the PC is corrupt,...