We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear support
I am trying to run a fpu instructions on STM32H503CBU6 microcontroller. When I check the values on the FPU registers, it remains 0x00000000 with respect to the particular S<n> registers that I'm trying to use.
Please see the snapshot below.
Here is the assembly code that I use to test the fpu register:
ldr r0,=a0_coeff ldr r1,[r0] vmov s1,r1 vcvt.u32.f32 s1,s1 vmov r2,s1 movw r3,#4096 vmov s15,r3 vcvt.f32.u32 s15,s15 vmov r0,s15 vcvt.u32.f32 s15,s15 vmov r1,s15 bx lr
This is the code also to enable the FPU on the microcontroller:
FPU_Enable ldr r0,=0xE000ED88 ;CPACR ldr r1,[r0] ldr r2,=0xFF0FFFFF ;Masking Bits(Clear Bits 23:20) and r3,r2,r1 ldr r2,=0x00F00000 ;Masking Bits(Sets Bits 23:20) orr r3,r3,r2 str r3,[r0]
dsb isb ; Reset pipeline now the FPU is enabled.
bx lr
Hope someone can help me out because I am planning to program a code to run an IIR Filter equation using assembly language.
Thanks and best regards