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.

Filter by
Sorted by
Tagged with
0
votes
0answers
46 views

Bit banging synchronous serial protocol on SAME70

I am trying to implement synchronous Serial protocol with SAME70 using board SAME70-XPLD. For that I need to generate clock of 2MHz. For that I am using TC module running at MCK/8 = 18.75MHz (MCK set ...
0
votes
0answers
26 views

STM Nucleo-F722ZE UART weirdness when setting the baud rate (it needs to be set 3 times larger)

For the past days I've been trying to communicate via UART between an Arduino and an STM32 Nucleo F722ZE board. After much troubleshooting with the oscilloscope I realized that when I set a baud rate ...
0
votes
2answers
63 views

Compare register value using logical AND (&) and ==

...
0
votes
1answer
47 views

Understanding addressing and size in memory map

TM4C123 has 256 kiBytes of flash ROM as shown in the memory map. The range of memory addresses for the ROM is 0x0000.0000 to 0x0003.FFFF (a 32bit address), totaled to 3x16x16x16x16 = 196,608 number of ...
0
votes
1answer
117 views

How can I flash the STM32F0 flash over SWD?

I am trying to program an STM32F0 from a linux based processor. I have connections to the SWRST, SWDIO and SWCLK pins. I have most of it working well, but when I go to write to the flash memory ...
0
votes
1answer
52 views

Does not Reset Handler move along with NVIC vector table?

My board: STM32F407G-DISC1 (based on STM32F407VGT6 microcontroller) See reference manual. (pages around 371 are related) My understandings Each interrupt service routine is located in a memory address,...
5
votes
4answers
521 views

The memory regions I can write and cannot write to, ARM Cortex-M architecture

I hope my title is correct terminologicaly. I am working(learning) with STM32F4 discovery board, which has an STM32F407VGTx microcontroller on it. I really try to find the answers in the reference ...
0
votes
0answers
43 views

STM32H745 dual-core debugging with IAR toolchain

I am working on STM32H745 dual-core controller and IAR Embedded Workbench for ARM toolchain V8.40.1 for development. My intension is to perform/enable dual-core debug instances in IAR using ST-Link ...
0
votes
0answers
65 views

Hardfault or otherwise wonky timer behaviour - STM32 Cortex M7

I am using the line marked by the arrow in the code below as such and it works fine. If I uncomment // HAL_TIM_IRQHandler(&htim2); there is one hit on the ...
1
vote
0answers
29 views

timestamp generator register location on Cortex-M4 (PSELCTRL CNTCR)

I am trying to find the location of the register where the timestamp generator can be enabled on a Cortex-M4 processor. In the CoreSight SoC Technical Reference Manual on page 3-210 it is mentioned ...
0
votes
1answer
71 views

STM32F7 Spurious I2C interrupt

I have a STM32F769NI, Cortex M7, using FreeRTOS, debugging using a JLINK inside of Rowley CrossStudio. The issue at hand is no flag interrupt cause. I2C3->ISR = 0x8000 which is the TXE flag, and I ...
0
votes
1answer
68 views

How can I wire a microusb to a MIMXRT1062DVL6A?

I've never touched a barebones microcontroller before. I've been toying around with an Arduino and Teensy for a few years now. Recently I've been itching to ditch the comfort of those buttercup ...
1
vote
1answer
131 views

Cortex M4 memory management suggestions: best data/code placement

I'm trying to implement a rather complex (at least for me!) system on a Cortex M4 mcu: LPC4370. This one has HighSpeed ADC (up to 80Msps), DMA and DSP (Single Instruction Multiple Data) instructions. ...
0
votes
0answers
214 views

Embedded C - USB stack, arm-none-eabi-gcc settings and Matlab interface

I am using LPCOpen (latest realese available for LPC4370) and the usb stack provided within it. I need to build a simple FSM to control the mcu with Matlab and send data from Matlab to the mcu and ...
0
votes
2answers
76 views

Migrating Cortex Application from Development Board to microcontroller chip [closed]

I have been working on different micro-controllers and I am new to Arm cortex architecture. I have developed an application on NUCLEO-F207ZG (powered by STM32F207ZG). The application is supposed to ...
2
votes
1answer
369 views

Correct wiring of Cortex-M 10-pin Debug Connector

The ARM Cortex-M 10-pin debug connector has five interesting signals, in the original PDF they're named: SWDIO / TMS SWDCLK / TCK SWO / TDO NC / TDI nRESET For MCUs which only support SWD and which ...
0
votes
1answer
206 views

How can I make my ILI9486 Display not show my frame until I'm done? (Flickering!)

I have a ILI9486 TFT display and I am using an LPC1768 with it. The issue I am having is in the following: ...
0
votes
2answers
95 views

Building NXP QN9020 firmware on GNU/Linux?

I just inherited a project that is based on the NXP SDK samples, (not quite sure which one). It is currently being built with µVision 4; but I would like to convert the build system to use ...
12
votes
2answers
3k 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 ...
2
votes
0answers
110 views

OpenOCD flash writing failure with STM32L071C8 MCU [closed]

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
72 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 ...
1
vote
1answer
85 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
116 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
454 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
282 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 ...
2
votes
2answers
5k 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
479 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
208 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
102 views

STM32F4 executable stack?

Is the stack executable on the STM32F4 MCU? I want to do this: ...
1
vote
1answer
481 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
963 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
2k 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
88 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
71 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
288 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
3k 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 ...
3
votes
2answers
1k 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
957 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. ...
5
votes
1answer
7k 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
1k 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
964 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
910 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 ...
0
votes
1answer
396 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,...
2
votes
2answers
894 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
196 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 ...
3
votes
3answers
2k 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
539 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
553 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 ...
5
votes
3answers
13k 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
331 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 ...