Teensy Register File Locations

Mark_7

Member
Hello,

I have a teensy 4.0 and would like to play with the registers directly.
Embarrassingly enough, i can't find the location of where they are stored on my computer. I also can't find it on google... I know this is possible since I've done this on Arduino UNO and DUE.

I installed the teensy software and have the Arduino IDE. I was able to program the teensy 4.0 so i know that's working.
I'm running a Windows 10 laptop.

Can someone point me in the direction of where the register files are stored in Windows 10?

Thanks, for all the help!
 
A "register file" is generally the CPU registers, these come from the ARM cortex architecture specification.
These are the registers where integers, floats, and pointers are manipulated by the CPU.
The register file on ARM Cortex-M7 include registers r0-r15, as well as s0-s31 (or d0-d15, for double precision.)

What you may be thinking about is "device/peripheral memory mapped control registers."
These depend on which specific peripherals are built-into, or attached to the microcontroller.
All the peripheral registers and locations are defined in the IMXRT data sheet, which you can find at https://www.pjrc.com/teensy/IMXRT1060RM_rev2.pdf
 
Hello,
Okay, thank you. I was able to find the needed file. To help others that may also have this problem, here is the exact location:

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4\imxrt.h

Yes, I am interested in the peripheral control registers (i.e. SPI, general purpose pins, ...). Yes, the registers are defined in the datasheet, but it's always good to reference the registers in the .h file. An example is the SPI status register. It's just called "SR" in the datasheet but in the imxrt.h its actually called LPSPI1_SR or sometimes you must use pointer notation to access registers (run into that on the Arduino Due recently)...

Anyways, I appreciate all your help. Problem solved!
 
Back
Top