Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
Ralphance
Level 3
Level 3
25 sign-ins 5 likes given First like received

Hello:

    When I add Aurix Development Studio's SMU_ Reset_ Alarm_ 1_ KIT_ TC397_ The TFT project, when ported to a project under the hightec compiler, will enter the trap when executing the following function. However, using the image file generated by the Aurix development studio compiler can run normally.

Please help solve the problem.

Ralphance_0-1685694272475.png

 

Thanks!!!

 

0 Likes
1 Solution
Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @Ralphance 
As @MoD pointed out, the ST.B instruction is the root cause, the below figure shows the assembly code of the MODULE_SMU.KEYS.B.PERLCK = 0xFFU, which is generated by the TASKING compiler.

2023-06-05_10h27_06.png

BR,
Jeremy

View solution in original post

5 Replies
MoD
Employee
Employee
10 likes given 50 likes received 500 replies posted

Check the generated assembler code for line  MODULE_SMU.KEYS,B.PERLCK = 0xFFU;

The register must be written 32 bit width. It can't be accessed by e.g. st.b

0 Likes
Ralphance
Level 3
Level 3
25 sign-ins 5 likes given First like received

Thank you very much for your reply.

The following figure shows the assembly code for register assignment you mentioned. If there is a problem with st. b, do you have any recommended compiler solutions? 

Ralphance_0-1685704782271.png

 

Thanks!!!

 

0 Likes
MoD
Employee
Employee
10 likes given 50 likes received 500 replies posted

Yes, the st.b is wrong here. It must be a st.w

Check the definition of PERLCK, this bitfield should b edeclared as Ifx_Strict_32Bit. Check also the compiler settings to avoid byte access here.

Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @Ralphance 
As @MoD pointed out, the ST.B instruction is the root cause, the below figure shows the assembly code of the MODULE_SMU.KEYS.B.PERLCK = 0xFFU, which is generated by the TASKING compiler.

2023-06-05_10h27_06.png

BR,
Jeremy

Hello @Jeremy_Z 

Thank you very much for your reply. It has been very useful to me and it can now be confirmed that it is a problem with the Hightec compiler configuration.

 

Thanks!!!

0 Likes