Hi there. I try to configure some registers of the SAM3x8E controller.
But I still dont understand something
I want to configure the TC channel control register in order so set the the SWTRG " bit 2 software trigger to 1" in order to get software trigger
I dont understand why i can find many adresses
Where is the problem here?
You have three timercounters:
#define TC0 (0x40080000U) /**< \brief (TC0 ) Base Address */
#define TC1 (0x40084000U) /**< \brief (TC1 ) Base Address */
#define TC2 (0x40088000U) /**< \brief (TC2 ) Base Address */
each of them has 3 channels (see table 37-5 in your linked document) where the offset is 0x00 + channel * 0x40 + 0x00
see hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/include/component/component_tc.h
and hardware/arduino/sam/system/CMSIS/Device/ATMEL/sam3xa/include/sam3x8e.h
for constant definitions.
Magician:
Just set SWTRG, don't worry about address. Here is an example:
To use that code, you have worried about, as you selected TC0, channel 0 (which will be the first of the nine addresses he asked for).
Its a nice example demonstrating the use.
Those are the aliases to the nine addresse he asked for:
which can be found in the previous mentioned header files.
I found it very helpful, when reading the documentation, digging through the CMSIS-definitions (grepping for register names or values) to find example data structures.