- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for all of your reply. I will check with the compiler side then. Btw @MoD what compiler u are using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Tasking, HighTec, Greenhills and Windriver.