cancel
Showing results for 
Search instead for 
Did you mean: 

AURIX™

FD_aurix
New Contributor II

 

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

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
New Contributor

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
FD_aurix
New Contributor II

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

0 Likes
µC_Wrangler
Employee

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
New Contributor II

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

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
New Contributor II

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

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

FD_aurix
New Contributor II

Thanks!

0 Likes