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-m3]

is an ARM 32bit RISC processor core for microcontrollers

2
votes
4answers
156 views

Cortex M3 reset handler with vector table relocation

I have a system with an STM32F103, which has a bootloader and a main app. Now, the main app is offset from the beginning of the flash to make room for the bootloader, and on cold boot the firmware is ...
2
votes
1answer
48 views

J-Link programmer in Windows 8 don't work

I use the J-Link programmer in Windows 8. A few days ago, my programmer hanged and the LEDs stayed silent, and I, with the help of the Internet, was again using the SAM-BA software to install the ...
0
votes
2answers
244 views

Unable to get SPI working on STM32 Cortex-M3 (Blue Pill) with CMSIS

I am trying to connect to an RFM95W module using the Cortex-M3 Blue Pill from ST. I am an embedded novice but know my way around linux, so I used the below code on an Rpi3 to connect to the chip and ...
0
votes
0answers
43 views

SoftConsole VS Keil for Smatfusion2 or any other development environment?

In order to program the ARM Cortex-M3 processor which is embedded in the Microsemi FPGA board SmartFusion2, I think there is two possibilities (correct me if wrong): Keil MDK (Microcontroller ...
3
votes
2answers
206 views

Understanding ARM instruction for numerical literal

I have done an instruction trace while trying to find a bug on a Cortex M3. There is one part of the command I cannot understand. STRB R1, [R3], #+0x01 According ...
0
votes
2answers
150 views

Configuring Registers in ARM Cortex M3

I've been learning to program LPC2148(ARM7) microcontroller, and today I got hold of an LPC1768(Cortex M3) board. By referring it's manual, I tried to make a LED blink program and did it as follows, ...
1
vote
2answers
94 views

Design an instruction using Thumb-2

I'm studying the Cortex-M3 of ARM. The problem statement reads: We're going to use a Harvard architecture with the following addressing capabilities: 32M words of code and 16-bit data words. The ...
4
votes
2answers
597 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. ...
1
vote
0answers
119 views

Interrupt priority in STM32F103RB

I got a doubt about an interrupt grouping in stm32f103. In programming manual of microcontroller I found 5 ways to configure it. But, while debugging, I found 8 ways. How is it possible to get ...
6
votes
2answers
638 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 ...
0
votes
1answer
103 views

Why does SendChar code of UART different between IRQ and Polling?

Now I'm trying to analyze STM32F103 Cortex-m3's UART code in IRQ and Polling mode. Ans I found 2 types example code such as the below. This is IRQ. ...
2
votes
2answers
361 views

Load and store CPU registers in application context

I just recently started working with a bare STM32F103C8T6 (an ARM Cortex M3) and ran into some difficulties. I have set up a SysTick_Handler to switch the current ...
0
votes
1answer
66 views

What is the relation between DAC peripheral bus and conversion/settling time

Going through the datasheet and the LPC17xx user manual, what is quite evident is how to select the various clocking options for the peripheral clock divider, i.e: ...
0
votes
1answer
461 views

What is the least amount of time that I can measure using STM32F1x Timers?

I am working with STM32F107 on a custom board, the board has 12MHz crystal. I want to measure 1 micro second precisely, but I am unable to do so. I have used STM32CubeMX to set the core clock at 72MHz ...
1
vote
2answers
4k views

STM32F103 ARM - Modifying Clock At Runtime - FLASH Latency

I am having b it of confusion regarding changing the clock tree of an STM32F103 Cortex M3 at runtime and I am hoping someone can help me with it. I am using a development board which has a 8Mhz HSE ...
1
vote
1answer
365 views

JTAG, OpenOCD and Atmel SAM3X

I'm trying to set up OpenOCD debugging through a JTAG port on a custom board with an Atmel ATSAM3X8E microcontroller. OpenOCD is running on a Raspberry Pi using the bcm2835 native GPIO. The JTAG ...
1
vote
0answers
101 views

Defining a variable in the bit-banded area

I wonder to know is there anyone who define a variable in bit-banded region in c programming language for cortex-M3 particularly LPC17XX. I have followed the compiler attribute for Keil (...
3
votes
6answers
2k views

What instruction on the STM32 consumes the least amount of power?

The ADC module of the STM32 is used in my application which is very sensitive to power consumption. In this application, the ADC is required to work only at 20 samples per second. Using the DMA uses ...
2
votes
1answer
224 views

How to read/write from a CPU using a usbWiggler?

Reading the Macraigor API for the usbWiggler MacraigorApi_ JtagScanlO ...
3
votes
2answers
492 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 ...
0
votes
1answer
686 views

Reading 2 Quadrature encoders using a single Arduino Due

I am working on an autonomous robot in my summer vacations. I am currently working on running the motors of my robot in a closed loop. In order to do so, I have to interface two Quadrature encoders of ...
0
votes
1answer
132 views

Can't understand a variable in the formula used to determine CDTY to set duty cycle of PWM on cortex M3 (SAM3X8E)

I want to generate complementary PWM on an Arduino due. For that purpose I am programming the cortex M3 using the PWMC library. In order to set the duty cycle I have to set a value in CDTY channel ...
0
votes
1answer
245 views

LPC1769 PC Communication

I am using LPC1769 micro controller and planning to use one of its serial (UART) port for PC communication. It has 4 UART ports (UART0,1,2 and 3) For PC communication purpose, can I use all ports or ...
2
votes
1answer
271 views

Howe to do a sam3x single channel ADC conversion

I have a Sam3x (Arduino Due hardware, but I don't use the Arduino IDE or libraries, and I don't use the Atmel libraries, just the register interface in sam.h). I have multiple pins configures as ADC ...
1
vote
1answer
112 views

3 mic sound direction locator solution?

I am building a robot toy. When a sudden surge of sound occurs, I wish to calculate the approx position of the sound source. I am going to place 3 analog mics on the edge of my round shape PCB, each ...
1
vote
2answers
162 views

Atmels AtSAM3s gets a bit warm running a test code on my dev board. Is there a problem?

I have a dev board developed by myself. I was using At91SAM7S256 but now I'm migrating to it's successor ATSAM3S8B. The MCU on the dev board for SAM3S gets warm. I am searching for someone with ...
1
vote
1answer
1k views

STM32 Standard Peripheral Library (SPL) - Modify SPI Configuration

I am using the STM32 SPL library with an STM32F103C8 microcontroller. As part of the project, I am using the SPI1 peripheral to interface with an SD card. Initially the SPI speed must be kept under ...
0
votes
1answer
182 views

LPC17xx internal pull-ups on JTAG etc

The the NXP LPC17xx Cortex-M3 family has internal pull-up resistors on some important pins such as the JTAG, NMI, Bootloader-select pin etc. While reading the data-sheet I learned that the pull-up is ...
3
votes
3answers
218 views

Finding maximum source impedance for A/D converter (SAM3X8E ARM Cortex-M3)

I would like to find out what is maximum recommended source impedance for A/D converter on Atmel SAM3X8E ARM Cortex-M3 microcontroller. I tried to follow the example of this excellent answer, which ...
0
votes
1answer
228 views

Cortex M3 GPIO address (LM3s300)

I had a little confusing regarding the address of GPIO_PortA As mentioned in datasheet: Based address of GPIO PortA:0x40004000 and GIOP_DATA has Offset : 0x000 which mean the address of GPIO_PortA = ...
1
vote
1answer
146 views

Necessary things in LPC1343 basic development board

I have finished my LPC1343 basic development board,just based on specs from datasheet and some referred from microbuilders.eu. I'm unsure if the board design is good or not so I've attached my ...
2
votes
1answer
526 views

LPC1788 external interrupt with CMSIS

There was a wide GPIO functions in the CMSIS initial versions which made easy setting and initialization of interrupts,like: ...
2
votes
1answer
2k views

differences between privileged mode and unprivileged mode in the RTX RTOS

As i said in the title what's differences between privileged mode and unprivileged mode in the RTX RTOS? And why in privileged mode threads has allowed full access to the cortex M processor?
2
votes
1answer
2k views

practical use of NMI in Cortex-M3

So some Cortex-M3 CPUs (and most other small CPUs as well) have a non maskable interrupt. I know what the NMI does, but I don't quite understand why I ever would want to use one. I'm looking for ...
9
votes
1answer
6k views

Storing a secure key in an embedded device's memory

I am working on an embedded device which send/receive data and stored them in ciphertext mode (encrypted mode). Now what's best approach for storing keys (I used ARM CORTEX M series MCU)? 1-Storing ...
0
votes
2answers
157 views

ATSAM3N Cortex-M3 RAM Bit Banding

If i do not use Bit Banding feature on ATSAM3N, this region, it will used by the compiler for the program? Or it will stay unused? What if my program, randomly (by itself) should need to assign and ...
0
votes
1answer
2k views

External RAM with ARM Cortex M-3

I'm planning to start with uclinux with my ARM cortex M-3 based MCU . Uclinux's requirements include ~4MB of RAM (SRAM - DRAM - .. whatever) and flash (SD card - NAND Flash - ... whatever). My MCU ...
1
vote
1answer
207 views

Cortex M3 debugging: Intermittent partial load of binary with pyOCD, then timeout

I'm debugging an embedded system and get intermittent binary loading errors when flashing the binary through gdb (well, arm-none-eabi-gdb, the toolchain gdb client). Here are the details of my setup: ...
-1
votes
1answer
1k views

how to make a phase shift on PWMs

I want to generate 2 PWM on PC6 & PC7 on an STM32f10x , it work fine but , the problem that I have is that I want to make them phase shifted to each other , say 45° and I really don't how to do ...
4
votes
2answers
13k views

setting the frequency of a PWM on a STM32

I'm trying to write a function that takes a desired frequency of PWM and sets the timer based on this value: ...
2
votes
2answers
5k views

STM32F103 GPIO not working

I am programming for LPC microcontrollers (mostly LPC1769), for the past few months with success. I decided though to give STM32 series a try. I just received a no-name board using an STM32F103C8 MCU ...
3
votes
1answer
4k views

STM32 USB - Delayed transmit when payload length = 256 (or 512, or 768…) bytes?

I am implementing USB communications on a STM32F105, using ST's USB Library v2.1.0. It communicates as a CDC class Virtual COM Port ("VCP"). I'm using the embedded Full Speed PHY. I've started with ...
0
votes
1answer
256 views

Flash memory read and write

I'm always disabling interrupts while writing to some sectors on Flash, but does Flash memory requires disabled interrupts even when you just want to read from it? Why yes and why not? Thanks for the ...
0
votes
1answer
433 views

Are unaligned LDRH/STRH supported on Cortex M3/M0?

Can all Cortex M0/M3 cores do this? LDRH r0, [0x8001] This would suggest yes but I don't see anything specific about Cortex-M cores.
1
vote
1answer
2k views

Sram in the ARM cortex m3

I load a project into the chip STM32f103ZC whose internal sram is 48kBytes , there are also 2MBytes external sram on the board. But when I download and debug the project,the map file tells that ...
0
votes
1answer
65 views

Calculating processor utilisation

I'm using a Cortex M3 processor on an LPC1769 board. For this particular situation, all processes occur within interrupts. Therefore, within the main "loop" there isn't actually anything to be ...
0
votes
3answers
169 views

Will XORing the FIO0PIN register on an LPC175x6x give unexpected results?

Is this code guaranteed to only effect pin 22? int* FIO0PIN = (int*)0x2009C014; *FIO0PIN ^= (1<<22); At first it seems like a dumb question but I remember ...
3
votes
1answer
1k views

How to use level-triggered interrupts with STM32F1xx?

I'm getting conflicting info on whether I can use level-triggered (as opposed to edge-triggered) interrupts with the STM32F1xx microcontroller. In ST's CMSIS-compliant Standard Peripheral Libraries, ...
2
votes
0answers
289 views

Strange behaviour using PWM on CortexM3

I have a board with the ATSAM3S2BA-AU, which is a Cortex M3 uC. I need to use 2 PWM channel , here how I've done it : ...
-1
votes
1answer
292 views

Trouble holding MCLR line low for PIC ICSP, ICD3 works, hardware defect?

I have an ARM Cortex-M3 that talks to a dsPic33F. I am attempting to do ICSP programming of the attached PIC. I have an analyzer and can see that I cannot control the MCLR line the same way the ICD3 ...