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

AURIX™ Forum Discussions

User21797
Level 2
First solution authored 10 questions asked 10 sign-ins
Level 2

Hi there,

Think I have found a bug in the iLLD for IfxSmu_lock() and IfxSmu_unlock()

I found that whenever the program calling these two function and try to write to smu->KEYS.B.CFGLCK, it jump to memory trap

More digging around found that the write access mode for the register SMU_KEYS have wording '32' (user manual table 10-30), I am guessing it means 32 bit access?

So e.g. for IfxSmu_unlock() I try to change 'smu->KEYS.B.CFGLCK = 0xBC;' to 'smu->KEYS.U = 0x000000BC;' and it work!!!

Wanta confirm is it really a bug? Or I am just using the function wrong?

I am using KIT_AURIX_TC234_TFT and iLLD_TC2xx_V1_0_1_13_0

Thanks for reading, any reply is appreciated.

0 Likes
1 Solution
MoD
Employee
50 solutions authored 100 sign-ins 25 solutions authored
Employee

I guess the compiler is here the problem. Please check the resulting assembler code which access width is used for access the SMU_KEYS register. The write access must be always 32 bit. If there is a byte access then the compiler ignores the Ifx_Strict_32Bit definition which informs the compiler that only 32 bit access allowed is for bitfield CFGLCK. From code point of view there is no error.

View solution in original post

4 Replies
FD_aurix
Level 5
5 solutions authored 10 likes given 50 sign-ins
Level 5

I don't know your particoular target but smu->KEYS.B.CFGLCK = 0xBC;'  and 'smu->KEYS.U = 0x000000BC;' do two different things. The second one set also the other part of the register (PERLCK) to 0!  Maybe is here the difference

MoD
Employee
50 solutions authored 100 sign-ins 25 solutions authored
Employee

I guess the compiler is here the problem. Please check the resulting assembler code which access width is used for access the SMU_KEYS register. The write access must be always 32 bit. If there is a byte access then the compiler ignores the Ifx_Strict_32Bit definition which informs the compiler that only 32 bit access allowed is for bitfield CFGLCK. From code point of view there is no error.

User21797
Level 2
First solution authored 10 questions asked 10 sign-ins
Level 2

Thanks for all of your reply. I will check with the compiler side then. Btw @MoD what compiler u are using?

0 Likes
MoD
Employee
50 solutions authored 100 sign-ins 25 solutions authored
Employee

I am using Tasking, HighTec, Greenhills and Windriver.