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.
156 questions
0
votes
1
answer
61
views
How does ATSAM3X8E's SAM-BA bootloader work?
I'm trying to understand the boot process section in the datasheet for ATSAM3X8E. According to the datasheet, this chip comes with SAM-BA bootloader at address 0x00000000:
If the bootloader is going ...
8
votes
3
answers
1k
views
Why does ATSAM3X8E have two separate registers for setting and clearing bits?
I am about confused about how to use registers on ATSAM3X8E. In the datasheet for PIO, for instance, there's almost always two registers for everything.
For example, there are ...
2
votes
1
answer
68
views
CORTEX-M jump causes UFSR=2
I have a binary file that is loaded to memory, where I need to make a call to function that is part of the binary myFunc. I know the declaration of the function as ...
0
votes
0
answers
20
views
Assigning pins to the Secure context of a TF-M application
Unless I'm wrong, the architecture of the TFM application seems not to allow the assignment of a peripheral (e.g. a LED pin) to the Secure context of TrustZone as it is the case with simple TrustZone ...
1
vote
1
answer
104
views
SWD scan failing for STM32H747 using a BlackMagicProbev2.3
I'm trying to debug an Arduino R1 Giga WiFi board with a STM32H747XIH6 mcu, which is a dual-core ARM Cortex-M4 and Cortex-M7 chip, using a Black Magic Probe v2.3 (BMP) from 1bitSquared. I've managed ...
2
votes
3
answers
354
views
ARM Cortex-M Processor Reset Behavior
I am trying to understand the ARM cortex-M hardware behavior on reset; particularly how the SP and PC values are written upon a cold start or hard reset.
A quick search did find a few similar ...
1
vote
1
answer
270
views
STM32F401 / Black Pill - PWM timer causes periodic ADC offset
I'm building a firmware to capture very short burst signals through the ADC on a STM32F401CC (Black Pill board).
I have a 100 Hz PWM output running on a different GPIO group
The ADC readout gets ...
0
votes
1
answer
82
views
Difference between Systick exception handler and Sytick interrupt handler. do all cpu exceptions also have IRQ handlers?
THIS IS WHAT MY UNDERSTANDING
Is Systick an exception or an interrupt? since it is one among the list of cpu exceptions, I'm coming to conclusion, systick as an exception.
since it is an exception, it ...
0
votes
1
answer
124
views
RN8213 software pack for Keil µVision 5
I am having a problem developing a firmware for RN8213 Cortex-M0 microcontroller from Renergy company. I installed the Keil µVision 5 development tool but I can't find the software package for RN8213 ...
0
votes
1
answer
537
views
eMMC initialisation questions about CMD line and its handshake commands
I'm trying to a new board working that has an eMMC connected to an iMX RT1062 via a multipelxer.
On the previous board, without a multiplexer it worked, but I don't have one of these boards to compare ...
3
votes
1
answer
106
views
How to start the user firmware after the bootloader firmware has finished in a Cortex-M3?
I'm trying to figure out the sequence of booting between bootloader and user firmware in the Cortex-M3. The Cortex-M3 design supports basic examples such as "Hello".
Here is the snippet for ...
1
vote
1
answer
406
views
Exception vs interrupt for Cortex-M chip
I'm not sure how to use the terms "exception" and "interrupt" correctly.
In the book Embedded Systems with ARM Cortex-M Microcontrollers in Assembly Language and C it says:
"...
16
votes
3
answers
3k
views
Confusion about USA export restriction regarding electronics
I am an electronic hobbyist based in Canada. Recently I bought different Microcontroller development boards from Mouser.ca This is mostly to satisfy my curiosity and to try out the different features ...
3
votes
0
answers
132
views
FreeRTOS is slow to wake after long processor sleep
(Cross-posted on Stack Overflow)
I'm using FreeRTOS in an application which requires the processor to sleep in low power mode for a long time (as long as 12 hours), then wake up in response to an ...
1
vote
1
answer
204
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 ...
0
votes
1
answer
222
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 ...
11
votes
3
answers
3k
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 ...
0
votes
1
answer
369
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 ...
0
votes
1
answer
262
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:
...
0
votes
0
answers
130
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 ...
1
vote
1
answer
125
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 ...
0
votes
0
answers
84
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 ...
0
votes
1
answer
146
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 ...
2
votes
4
answers
1k
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 ...
0
votes
1
answer
367
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 ...
1
vote
0
answers
769
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:
...
0
votes
2
answers
237
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....
0
votes
1
answer
389
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 ...
4
votes
1
answer
3k
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 ...
0
votes
0
answers
56
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?
...
8
votes
1
answer
636
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 ...
1
vote
1
answer
419
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 ...
0
votes
0
answers
96
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 ...
1
vote
0
answers
208
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
2
answers
1k
views
0
votes
1
answer
2k
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 ...
1
vote
1
answer
2k
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
1
answer
649
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
4
answers
2k
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 ...
1
vote
0
answers
137
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
1
answer
376
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
1
answer
106
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
1
answer
841
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
0
answers
291
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
2
answers
98
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
1
answer
2k
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
1
answer
625
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
2
answers
143
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
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 ...
2
votes
0
answers
526
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 ...