GTM datasheet double bit register

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
FD_aurix
Level 5
Level 5
100 sign-ins 100 replies posted 5 solutions authored

 

Hello to all

I have some documentation related questions. I am checking the GTM part and there is some inconsistency in the description of some double bit registers.

Where "write / read" is present in the description, the "left" column is for writing and the right column is for reading (at least I suppose ...). FOR INSTANCE. in RST_CN0_CHx I can only read 0x00 or 0x11 and if I write 0x00 or 0x11 the effect is the same (it doesn't matter)

 

In other register descriptions this difference is not specified (eg OUTEN_STAT). I have to use the same logic (writing 0x00 or 0x11 doesn't affect the register value?

 

0 Likes
1 Solution
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

Hi FD_aurix.  I wasn't quite sure myself - so before I answered your question, I used AURIX Development Studio and built the GTM_TOM_Interrupt_1_KIT_TC375_LK example, and executed it on a TC375 Lite Kit.

I agree that part of the documentation is not crystal clear - but my previous answer is how it actually works 😁

View solution in original post

8 Replies
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi FD_aurix,

GTM is always very interesting topic. Please could you provide us more insight about the toolchain you are using and a little bit more about the aimed functionality.

Thanks.

Regards,

TBencher

0 Likes

I'm not yet using the MCS of the GTM so I'm using it as a standard peripheral.

0 Likes
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

Hi FD_aurix.  You're on the right track - if you want to change one of these double-bit values, your application needs to write 01 (disable) or 10 (enable).  Values of 00 and 11 are ignored.  That way, you can update only the channels you want, and avoid disturbing the others.

As an example: TOM0_TGC0_OUTEN_STAT.U = 0x0000000A enables CH1 and CH0 (0xA = 1010b, which means OUTEN_STAT1=10b and OUTEN_STAT0=10b).

0 Likes
FD_aurix
Level 5
Level 5
100 sign-ins 100 replies posted 5 solutions authored

Hi uC_Wrangler

Thanks for the feedback!. Yes I've understood the reason of this kind of control. So also when it is not specified I can consider the first as "write" and the second as "read" action (see the second image of the open post)?

0 Likes
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

Hi FD_aurix.  Sorry, I'm not following what you mean with first/write and second/read.  Perhaps this helps:

  • If you enable a channel with 10b, it reads back as 10b
  • If you disable a channel with 01b, it reads back as 01b
  • Channels that have never been enabled or disabled read back as 00b
  • If you write 00b or 11b, it has no effect
0 Likes
FD_aurix
Level 5
Level 5
100 sign-ins 100 replies posted 5 solutions authored

Hi

Are you sure what you have wrote above :-\? I think that if I enable it writing 10b I should read back 11b and if you wrote 01b it should be read back as 00b

 

In any case what is not clear is the datasheet... some register seems to have the above described behaviour but in the datasheet this is not explicit..  Take the example in the attached picture , I suppose the yellow lighted part (first column) are referred to the write and the green (second column) to the read but is not specified.

Immagine 2021-11-30 065755.png

0 Likes
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

Hi FD_aurix.  I wasn't quite sure myself - so before I answered your question, I used AURIX Development Studio and built the GTM_TOM_Interrupt_1_KIT_TC375_LK example, and executed it on a TC375 Lite Kit.

I agree that part of the documentation is not crystal clear - but my previous answer is how it actually works 😁

FD_aurix
Level 5
Level 5
100 sign-ins 100 replies posted 5 solutions authored

Thanks!

0 Likes