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
1 vote
1 answer
47 views

Resizing a vector with ARM CMSIS DSP on Teensy 4.0 (Cortex M7)

I have the following code that does the resizing of a 1D vector with nearest neighbor interpolation in a similar fashion you'd also resize an image, only in 1D rather than 2D. Another term would be ...
user avatar
0 votes
1 answer
38 views

STM32H743 MDMA can't access APB2

I have a code that mdma can access any variable feed to it by &var (AXI SRAM) also I have gave it an address of ADC common registers from APB1 but adress from APB2 &hrng.Instance.DR causes ...
user avatar
11 votes
3 answers
1k views

Why do we see one, unified memory address space in ARM Cortex-M core based MCUs even though they have Harvard architecture?

Most of the ARM Cortex-M core based MCUs have Harvard architecture (except for Cortex-M0 and M0+.) The thing I do not understand is that why we see only one memory address space. For example, in tge ...
user avatar
  • 165
0 votes
1 answer
56 views

Is QSPI pseudo-sram here to stay? [closed]

Doing a new design for a industrial printer that was using an expensive SRAM part on an old Hitachi part. The new Cortex M processor has limited bus pins, and we're thinking of putting a QSPI RAM on ...
user avatar
  • 174
0 votes
1 answer
34 views

TM4C123GXL Tiva launchpad: Hardware Fault when debugging in Keil Microvision

I got a weird problem last night. Here is a simple program that uses pin PA7 to drive a LED: ...
user avatar
0 votes
0 answers
49 views

SPI Bit bang to enable/read/write EEPROM from TM4C123GXL

I have checked a few bit bang posts here but still couldn't figure it out. The datasheet of the EEPROM is at: Datasheet of FT93C66A I tried to interface with SPI but to no avail, so I decided to use ...
user avatar
0 votes
1 answer
41 views

TLE9879 SoC debug interface only works when under-volted

I'm using a TLE9879 BLDC Shield as a development kit, that is, I'm programming the SoC itself rather than controlling it with an Arduino. The board has a Cortex 10 pin SWD interface, to which I ...
user avatar
0 votes
0 answers
45 views

OpenOCD debugging issue with st link

I purchased STM32F69 discovery board and installed Eclipse with MCU plugin for C/C++ development and also OpenOCD. While experimenting with some sample code, debugging stops at the only breakpoint I ...
user avatar
  • 23
0 votes
1 answer
71 views

S32K14x SWO pin initialization for standalone application

Here is my setup: [target(S32k146)] <-(SWD)-> [iSystem IC5000 with a CoreSight adapter] <-> [Host (Windows 10, WinIDEA 9.17] I am trying to establish a debug channel via SWO. I have an ...
user avatar
  • 57
2 votes
4 answers
478 views

Embedded: Main Stack Pointer and Process Stack Pointer co-existence

I have a follow-up question to the one asked here: Main Stack Pointer(MSP) vs Process Stack Pointer(PSP) I was wondering about how these pointers are managed so that they do not write in the same ...
user avatar
0 votes
1 answer
93 views

Cortex-M4 how to recover from vector table read fault in an empty device?

I have to load and run firmware in RAM of an empty Cortex-M4 chip (in a manufacturing environment). The chip ordinarily expects vector table at address 0x0 in flash. When I am loading my firmware to ...
user avatar
  • 8,416
1 vote
0 answers
111 views

How we can jump to address of function(or specific address)?

I working with ARM CORTEX-M4. I wrote this code for jump to a function. I define this function: ...
user avatar
0 votes
2 answers
95 views

Does Cortex m3 parse a firmware code from -code D-code bus?

I'm trying to understand the reason of I-code and D-code bus in Cortex M3 and how simple arbiter into single slave(Flash/ROM/RAM) can make an improvement performance of device. (https://community.arm....
user avatar
  • 429
0 votes
1 answer
71 views

Help understanding ARM Cortex-M4 SBC instruction

Page 88 of the ARM Cortex-M4 Generic User Guide says "The SBC instruction subtracts the value of Operand2 from the value in Rn. If the carry flag is CLEAR, the result is reduced by one." Why ...
user avatar
0 votes
0 answers
59 views

Why the assembly code does not match the number of cycles of ARM M4?

I ran the following C program on STM32F405 (ARM Cortex-m4). I tried to comprehend its computation period instruction-by-instruction. ...
user avatar
  • 13
2 votes
0 answers
374 views

ARM Cortex-M Floating Point Multiply-Accumulate Cycle Time

According to the ARM Cortex M4 technical manual, a floating point multiply accumulate instruction (VMLA.F32) takes 3 cycles. However the separate multiply (VMUL.F32) and add (VADD.F32) instructions ...
user avatar
  • 4,491
0 votes
0 answers
37 views

Atmel SAM3X8E (cortex M3) MPU confusion

The SAM3X8E has a MPU, what I am confused about is how to combine both SRAM and FLASH into the same protected memory region since they live at different contiguous region addresses. Is this possible? ...
user avatar
7 votes
1 answer
239 views

ARM Cortex-M4 VFMA (fused multiply-add) performance? 3, 2 or 1 clock? Forwarding?

I am working on some performance-critical DSP code destined to run on an ARM Cortex-M4. One particular section of the code (a sinc interpolation function) is dense with multiply-accumulate operations ...
user avatar
1 vote
1 answer
83 views

ATSAME70Q21 at 1.8V -- cannot program flash memory

A recent revision of a board based on the ATSAME70Q21 (a Cortex-M7) is exhibiting problems. The previous revision of the board had been working for quite a while. [EDIT] The exact part number as it ...
user avatar
  • 1,846
0 votes
0 answers
58 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 ...
user avatar
  • 131
0 votes
0 answers
110 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 ...
user avatar
  • 3
0 votes
2 answers
412 views

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

...
user avatar
  • 1,188
0 votes
1 answer
413 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 ...
user avatar
  • 1,188
1 vote
1 answer
756 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 ...
user avatar
0 votes
1 answer
232 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,...
user avatar
  • 1,966
5 votes
4 answers
816 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 ...
user avatar
  • 1,966
1 vote
0 answers
53 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 ...
user avatar
0 votes
1 answer
185 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 ...
user avatar
  • 1,796
0 votes
1 answer
85 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 ...
user avatar
  • 199
1 vote
1 answer
317 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. ...
user avatar
  • 325
0 votes
0 answers
247 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 ...
user avatar
  • 325
0 votes
2 answers
82 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 ...
user avatar
2 votes
1 answer
743 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 ...
user avatar
0 votes
1 answer
424 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: ...
user avatar
0 votes
2 answers
122 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 ...
user avatar
  • 111
12 votes
2 answers
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 ...
user avatar
2 votes
0 answers
299 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 ...
user avatar
0 votes
0 answers
96 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 ...
user avatar
  • 325
1 vote
1 answer
160 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 ...
user avatar
0 votes
3 answers
120 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 (...
user avatar
  • 117
2 votes
1 answer
992 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'...
user avatar
1 vote
1 answer
433 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 ...
user avatar
2 votes
2 answers
8k 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 ...
user avatar
  • 429
0 votes
1 answer
986 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 ...
user avatar
1 vote
1 answer
272 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, ...
user avatar
0 votes
3 answers
149 views

STM32F4 executable stack?

Is the stack executable on the STM32F4 MCU? I want to do this: ...
user avatar
  • 15
1 vote
1 answer
796 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 ...
user avatar
  • 145
-1 votes
1 answer
1k views

STM32L0 GPIO Interrupt problem

I am trying to blink the led(PA5) when PC13 Button is clicked. But it doesnot work. main.c ...
user avatar
  • 101
0 votes
1 answer
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 ...
user avatar
  • 135
1 vote
2 answers
123 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 ...
user avatar
  • 2,568