On the Teensy 3.6 the register CMT_PPS has the address 0x4006200A according to the datasheet. How can I access the CMT_PPS register using this address?
On the Teensy 3.6 the register CMT_PPS has the address 0x4006200A according to the datasheet. How can I access the CMT_PPS register using this address?
I imagine this page may help: http://infocenter.arm.com/help/index...qs/ka3750.html
Seems to be just a matter of creating a pointer variable to that register.
for T3* boards most register symbols are defined in hardware/teensy/avr/cores/teensy3/kinetis.h
so all you have to do is reference it in your sketch, e.g. Serial.println(CMT_PPS,HEX);Code:#define CMT_PPS (*(volatile uint8_t *)0x4006200A) // CMT Primary Prescaler Register
For Teensy 4, see hardware/teensy/avr/cores/teensy4/imxrt.h
@vjmuzik: Your link was of great help! I did not read/write the registers with the right size (32,16,8 bit). Now it works.
@manitou: I know that I can use the names for the periperals, but I wanted to access them without using names. Thanks for the hints to the place where the constants are defined.
Thanks to all those people at this forum helping a beginner!