Questions tagged [cortex-m4]

embbedded processor by ARM belonging to the Cortex-M family.

Filter by
Sorted by
Tagged with
0 votes
4 answers
151 views

Using ARM Cortex on breadboard

I want to know if can I use an ARM-Cortex-M4 processor directly on a breadboard and then create a microcontroller on a breadboard. I already tried searching google but didn't find anything. Please ...
stng's user avatar
  • 3
0 votes
2 answers
41 views

NRF52840 interrupt forwarding

I've build a bootloader for the NRF52840, and inserted my own MBR. I've incorporated the s140 binary into code, so I'm trying to get this fly after programming. It takes off, but dies, coming back ...
Erik Friesen's user avatar
  • 1,923
0 votes
1 answer
44 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 ...
Challa Harikrishna's user avatar
0 votes
1 answer
93 views

What causes this "stuck address" behavior in STM32 peripherals?

I recently overcame an issue while writing some startup assembly for the STM32G474, which had to do with each peripheral having a "clock enable" bit that needs enabled before the peripheral ...
Aaron Linnell's user avatar
0 votes
0 answers
142 views

STM32 M4 not running after J-Link and J-Flash

I'm temporarily using a J-Link Pro as a production programmer for a STM32L4R9. I've modified the scripts found here https://wiki.segger.com/ST_STM32 to unlock, then lock and set the option bits for ...
Erik Friesen's user avatar
  • 1,923
1 vote
1 answer
2k views

How do I receive data over USB on an STM32F401RE Nucleo board?

I am very new to STM32s. I have been trying to interface a sensor using an STM32F401RE Nucleo board but failing to receive sensor data from the board. I generate 3 clock signals to drive the sensor. I ...
Harit's user avatar
  • 73
1 vote
2 answers
253 views

Cannot configure timer to 10µs on STM32F401 device

I'm using an STM32F401CCU6 microcontroller and am trying to generate a timer interrupt of 10 us with TIMER3. The timer is a update event timer. The formula I'm using is: ...
Owais Ahmed's user avatar
2 votes
0 answers
238 views

DebugMon_Handler not triggered even after configuring DWT (Data Watchpoint and Trace) to look for memory writes

Can anyone advise why my actions described below do not work?: I have been trying to run the code snippet from the post Can Cortex M4 data watchpoint trigger an interrupt without a debugger? on(...
K. Sai Bharadwaj's user avatar
0 votes
0 answers
69 views

Serial Output not working

I am fairly new to the Tiva C series launchpad and the microcontroller arena, in general. I am using TM4C123GXL launchpad, and keil uvision. Have been fairly successful in implementing basic examples ...
Ashutosh Singh's user avatar
1 vote
1 answer
413 views

Nucleo-L432KC USART can only send data but not receive from putty

trying to use virtual com port of the mentioned Nucleo board DATASHEET I can send chars nicely to the putty output but now wants to be able to send commands too from putty the peripheral is ...
Mahmoud Salah's user avatar
1 vote
1 answer
195 views

USART2 of NUCLEO STM32L432KC board isn't going through USB to my serial screen

I tried using the virtual com port by using usart2 of the nucleo mentioned DATASHEET I configured the peripheral as shown but nothing appears on the serial screen. used gdb to assert the register ...
Mahmoud Salah's user avatar
5 votes
3 answers
3k views

What is the meaning of the keyword "__weak" in this callback function in HAL GPIO function?

I have started learning STM32 programming in HAL and I am confused about what this function exactly does: ...
user8737703's user avatar
1 vote
2 answers
112 views

Are peripherals in microcontrollers purely hardware or do they run code?

Specifically in Cortex-M4 (if that matters), when doing GPIO you need to write and/or read from GPIO's memory-mapped registers. Before diving deeper into library code that handled this for me, I ...
zombiesauce's user avatar
1 vote
1 answer
90 views

How many timers can one utilize from ATSAM4s2A?

I am getting introduced to Atmel ARM MCUs and I have several dilemmas regarding their documentation. According to the official Farnell documentation of ATSAM4S2A. the MCU supports only three timers: ...
Phill Donn's user avatar
0 votes
1 answer
295 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 ...
filo's user avatar
  • 8,931
1 vote
0 answers
587 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: ...
HwSwDesigner's user avatar
1 vote
2 answers
1k views

JPEG compression benchmark on Cortex M4

I am currently using an STM32F4xx and extracting an already compressed JPEG from a camera module OV5645 as that particular sensor has an internal JPEG codec. I want to starting using a new sensor, ...
Gmae's user avatar
  • 13
0 votes
0 answers
531 views

TM4C129EXL: Read UART data form RX TX pins and display on console in Code Composer Studio

I am using a TM4C129EXL Tiva-C launchpad and I am facing difficulty in reading the data from the RX and TX pins which are connected to a NEO-6M GPS module. The NEO-6M led indication shows that ...
Adithya Shetty's user avatar
0 votes
1 answer
321 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
8 votes
1 answer
522 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 ...
Zane Kaminski's user avatar
0 votes
1 answer
87 views

Using C++17 static inline members in embedded MSP432 application, program fails to launch as reset occurs

I am unable to debug my embedded software since I started using static objects. I do not think that there is much difference in memory allocation/initialization between the classic static variables ...
GioP's user avatar
  • 31
2 votes
1 answer
348 views

Bit banding in Arm cortex M4

I am confused about the concept of using a pin offset in bit banding. EG, given that PORTA has a base address of 0x40004000 and the 5th bit has an offset of 0x0080, the address of the pin should be ...
Mohamed Wehba's user avatar
1 vote
2 answers
1k views

How do you set an STM32F4 IRQ handler without using the HAL?

I'm using the STM32F405xx/407xx architectures, which is a Cortex-M4. The online documentation and tutorials on this subject are overwhelmingly HAL-based. I am converting a project over from another uC ...
ChalkTalk's user avatar
  • 211
4 votes
1 answer
692 views

Why operations on float variable are performed on a double? STM32F401RE, MDK-ARM v5

I am debugging a simple line of code: float temp_f; ... ... temp_f= temperature[0] +(temperature[1] >> 5)*0.125; that is assembled into ...
Artem Glukhov's user avatar
0 votes
0 answers
36 views

How do I detect the output voltage of the charging controller?

My project uses Li-ion battery charger LTC4099 (https://www.analog.com/media/en/technical-documentation/data-sheets/4099fd.pdf). And S6E2DH FM4 microcontroller (https://www.cypress.com/file/224786/...
Nikeboy's user avatar
  • 63
0 votes
1 answer
376 views

Which pins of ATSAMD51 are used for I2C in Adafruit Grand Central?

I am trying to recycle my old Adafruit Grand Central board to use with Atmel Studio.I Adafruit website , I2C pins ( SDA , SCL ) are marked as PB20 and PB21 to be used as SERCOM-3 but in ADSAMD51 ...
Aug's user avatar
  • 1,571
0 votes
0 answers
389 views

Streaming video over NRF24L01P

Consider that we have compressed camera output video by JPEG using a Cortex-M4 MCU (Like STM32F407xxx that has a DCMI unit). I want to know, Is it possible to ...
HamidReza's user avatar
  • 101
1 vote
0 answers
4k views

STM32F4 Systick timer HAL_SYSTICK_Config() clock value

In STM32F4 controllers, systick timer is configured to generate interrupt on every 1 ms. If clock frequency is changed, then the number of ticks requred for 1ms should be given as a parameter to the ...
Athul's user avatar
  • 241
1 vote
0 answers
127 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 ...
Chatdeschroedinger's user avatar
1 vote
0 answers
184 views

Imprecise bus error when setting Vector Table Offset Register. TI CC2652

I am developing a bootloader and want to jump to the application. I am new to this so I am not entirely sure I am doing it right, but as far as I know I have to change the value stored in the VTOR (...
Vincent Kenbeek's user avatar
0 votes
1 answer
69 views

Tools and libraries to use with J-Link OB and CoreSight

I have a system with including a Beagle Bone Green board, a J-Link OB module and a Cortex-M4 microcontroller (see figure). I would like to use the DWT and ITM features but don't quite understand how ...
Chatdeschroedinger's user avatar
2 votes
1 answer
231 views

When does the stack pointer get copied from flash to SP on startup?

I'm trying to track down a problem on a MKV31F256 micro. The firmware immediately jumps to the hard fault handler on startup. I'm able to set a breakpoint on the first assembly instruction in the ...
CurtisHx's user avatar
  • 997
0 votes
1 answer
220 views

Memory Boundaries in SRAM

I am trying to use the GPDMA which is present in LPC43XX parts. The UM10503 data sheet constantly warns about memory boundaries (datasheet section 21): basically it says that you don't want to try a ...
a_bet's user avatar
  • 327
2 votes
1 answer
795 views

STM32F411VE Custom bootloader USB de-Init issue causing Jump to app fail

I'm developing a custom a bootloader on STM32F411VE MCU which must download a .bin file from USB key and flash it into the application sectors of flash memory. Following the examples provided with ...
gdivella's user avatar
2 votes
1 answer
2k 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'...
Inbae Jeong's user avatar
1 vote
1 answer
156 views

How does ARM CMSIS functions access Core registers in unprivileged mode?

As per my understanding the ARM M4 core registers such as NVIC registers can be accessed only when the software is in privileged mode, that means it should be running in handler mode if I am correct. ...
Mukesh's user avatar
  • 80
1 vote
1 answer
776 views

SAM Timer counter / atmel ASF

I'm trying to implement function call after having timeroverflow or comparison of counter registers. Chip: SAM4E ...
Hasan alattar's user avatar
0 votes
0 answers
2k views

STM32F4 CubeMX SysTick timer rate

I am using CubeMX to generate initialization code for STM32F407 MCU. I wonder where can i see the SysTick timer rate in CubeMX or its generated code? I am using 8 MHz external crystal and set SYSCLK ...
scico111's user avatar
  • 867
0 votes
0 answers
93 views

Reading GPIO configuration (Cortex M4 ATSAME54)

I'm writing some diagnostics for a Cortex-M4 -- in this case an ATSAME54. I'd like to be able to read the configuration of individual GPIO pins, namely: bool level enum gpio_direction direction [IN, ...
fearless_fool's user avatar
2 votes
1 answer
244 views

STM32F7 trimming step frequency

In the past I calibrated the frequency of the High Speed Internal oscillator (HSI) in an STM32F0 device adjusting the value of the register RCC_CR, field HSITRIM. In the ref. manual it says that the ...
naggety's user avatar
  • 161
1 vote
1 answer
919 views

What is the difference between system clock and peripheral clock in case of arm Cortex M4 architecture? [closed]

System clock/core clock is the clock that drives the CPU. I understand that different internal peripherals use the oscillators. How do both differ from each other?
manohar's user avatar
  • 11
0 votes
3 answers
194 views

STM32F4 executable stack?

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

Uclinux vs Linux [closed]

Searching Internet, I found an operating system called uclinux which can run on ARM Cortex-M7. How is it different from the orginal Linux which runs on PC?? What about librarys such as QT GUI? Is it ...
Mehran Memarnejad's user avatar
0 votes
0 answers
653 views

Why doesn't my STM32F4 PLL seem to work?

I've spent a few days unsuccessfully trying to get my Nucleo F401RE to use the PLL for its system clock. I've configured it to use the 8MHz HSE and output 84MHz as the system clock. The code stops ...
Isvara's user avatar
  • 514
2 votes
1 answer
747 views

Why am I not able to compile this assembly code?

When assembling the code, I get the error : fpu.s(13): error: A1240E: Immediate value cannot be used with this operation ...
Nirmal Anand's user avatar
1 vote
1 answer
168 views

stm32f429 flash load address error

I've recently run into this error where openocd wont flash the binary to my discovery board. I'm using the same linker script that i've been using all along. arm-none-eabi-objdump gives the ...
Asusrog's user avatar
  • 85
0 votes
0 answers
260 views

Building a simple line out from a mcu DAC

I'd like to get audio (specifically a line out) from a Cortex-M4 10 bit DAC (LPC-4337). The dev board I'm using already has a 470 Ohm resistor in series with the DAC. Since I've never worked with ...
royconejo's user avatar
  • 143
0 votes
0 answers
346 views

Infineon XMC4200 alternative pin function for I2C using XMClib

Since i'm unable to post on the infineon XMC forum any more i will try to find help on this forum. I'm working on my first I2C code with the XMC4200 hexagon kit. I'm using Dave4 with the XMCLib. I'm ...
reyntjensm's user avatar
0 votes
0 answers
679 views

STM32L4 No UART Message

I've been trying for the past 2 days to get the USART2 controller (pins PD5 & PD6) working on the STM32L476VG Discovery, which allows for UART communication over the ST-LINK cable. I'm using the ...
akivjh's user avatar
  • 23