66AK2G12: Not able to enable VFP and NEON

Prodigy 40 points

Replies: 4

Views: 96

Part Number: 66AK2G12

We are using K2G ICE target board, here we are also using the SBL provided by TI.

  • Initially, SBL initializes the PLL and SDRAM.
  • After that, using some JTAG debugger we are resetting the CPU only
  • And then trying to write down some custom program into the SDRAM
  • Finally trying to execute that custom program from the SDRAM

Our problem is, we cannot enable the VFP and NEON from that custom program. Basically, we have found some problems in enabling access for CP10 & CP11 using the CAPCR register.

We have found that if we set CPACR.CP10 and CPACR.CP11, then these bits are changed back to 0. From ARM CA15 TRM, we have found that,

So, this behavior suggests that this CHIP does not support NEON and VFP. Could you please confirm?

Or, we need to do some special mechanism so that we can enable NEON and VFP?

Please note we have tried several other experiments too,

  • We have found that the following section of code for enabling VFP and NEON in the SBL code C:\ti\pdk_k2g_1_0_16\packages\ti\boot\sbl\soc\k2g\sbl_soc.c is getting compiled


int32_t SBL_socInit()

    Board_initCfg boardCfg;
    boardCfg = BOARD_INIT_PLL | 
        BOARD_INIT_DDR |

    void (*monitorFunction) (void (*)(void), ...);

    /* A15 startup calls */
    monitorFunction = (void (*)) 0x1000;



  • This indicates, neon and VPF should already be enabled in the SBL code, and also access for CP10 & CP11 should be enabled.
  • We powered on the board
  • So, at this moment we can expect only ARM BOOT ROM code and SBL have executed. Also, the default "app" file is executed.
  • We connected to the board using debugger, but not done CPU reset or anything. We have also not tried to load and run our special code. We just connected to view the content of the CP15 registers.
  • Although we have expected to see CPACR.cp10 and CPACR.cp11 bits as set, but we found those bits are actually 0.
  • i.e. the SBL's behavior is the same as our custom program which I have mentioned earlier.
  • So we are suspecting either NEON and VFP are not supported or, there are some steps that we are missing to perform.

Could you please help us in enabling the NEON and VFP?

Please let me know if you need any other information.

4 Replies

  • Sumit,

    Neon and VFP is supported on Cortex A15 integrated in K2G SoC. this has also been indicated in the TRM

    The SBL enables the Neon and VFP core using monitor functions in the SBL_socInit function. I suspect that when you do a CPU reset, that setting may be getting reset to disable the setting. All of the Processor SDK RTOS software is tested with the two settings enabled.

    Can you please check if you are in monitor mode when setting up and reading the CP15 registers or CPACR register. You can also look at the CP15FPUEnable in the K2G A15 CSL folder here:pdk_k2g_1_0_14\packages\ti\csl\arch\a15\V1



    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.


  • In reply to Rahul Prabhu:

    Dear Rahul,

    Thank you for your response, but sorry the problem is not solved yet.

    There are several points which I want to mention.

    • I am using the latest PDK version which is available in the TI website, i.e. pdk_k2g_1_0_16. Hopefully, this will not make any difference.
    • I have checked the situation without the CPU reset operation also and found the same problem
    • I am suspecting whether the specification is updated or not because I have found some other differences also between the hardware and the specification,
    • e.g. the specification says it contains R2P2 CA15 processor, but in reality, we found it has R2P4 processor.
    • Could you please confirm whether there is any updated specification? (I am using 66AK2G12 chip on K2G ICE board)
    • We have found that, although "CP15FPUEnable()" function is defined, but it is not used anywhere in the SBL code base.
    • So, possibly FPU is not enabled from the SBL.

  • In reply to Sumit Paul:


    The CP15FPUEnable() is not called because the SBL code  enables Neon and VFP using the following code 

        void (*monitorFunction) (void (*)(void), ...);
        /* A15 startup calls */
        monitorFunction = (void (*)) 0x1000;
    More over all of our software for A15 has VFP and NEON instructions enabled in compiler settings and tested with code generated with those settings.
    I have checked our design specs which also seems to indicate that the A15 version integrated in K2G is r2p2 so I am not sure why this is showing up as R2P4. I will check with our design team to understand the A15 configuration. 
    Can you please provide more details about your SBL setup and CCS setup. Are you in the correct privilege mode to read the CP15 contents. Also, please indicate the ARM GCC version that you are using.  If you see older 4.9.3 GCC enabled VFP by default but newer 6.3.1 did not so we had added the code that you are referring to to enable VFP and Neon explicitly in SBL. Please refer to my E2E response here:

    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.


  • In reply to Rahul Prabhu:

    Dear Rahul,

    Thank you for your response.

    > Can you please provide more details about your SBL setup and CCS setup. 

    I am using the default code of pdk_k2g_1_0_16.

    I am using the following commands for the compilation of the SBL,

    • cd C:\ti\processor_sdk_rtos_k2g_6_03_00_106
    • setupenv.bat
    • cd C:\ti\pdk_k2g_1_0_16\packages\ti\boot\sbl
    • gmake all BOOTMODE=mmcsd BOARD=iceK2G SOC=K2G

    Please let me know if you want some other details.

    > Are you in the correct privilege mode to read the CP15 contents.

    I have checked with two different modes, i) Supervisor mode ii) System mode

    > Also, please indicate the ARM GCC version that you are using.

    I am not using the ARM GCC, I am using armclang 6.6

    New observation and findings:


    I have done some further investigation and found the followings.

    • I read the CAPCR.cp10 and CAPCR.cp11 from SBL code itself and found those are set properly after execution of  (*monitorFunction)(SBL_a15EnableNeon); in C:\ti\pdk_k2g_1_0_16\packages\ti\boot\sbl\soc\k2g\sbl_soc.c -> SBL_socInit()
    • Which indicates, the CPU actually supports NEON and VFP but due to some reason we cannot enable those from our custom code
    • I have debugged the situation further and found  (*monitorFunction)(SBL_setNSMode) call is necessary before setting CAPCR.cp10 and CAPCR.cp11
    • But the problem is we cannot call (*monitorFunction)(SBL_setNSMode)  from our initial arm assembly code. Whenever we are calling that, the CPU is getting exception.
    • Do you have any idea regarding, how to call the monitor function "(*monitorFunction)(SBL_setNSMode) " from arm assembly code? We have used the following code but not worked,
    /* Copied the following function from SBL code */
        mrc p15, #0, r1, c1, c0, #2
        orr r1, r1, #(0xf << 20)
        mcr p15, #0, r1, c1, c0, #2
        mov r1, #0
        bx lr
         ldr   r0, =SBL_a15EnableNeon /* Pass the argument */
         ldr   ip, =0x00001000/* Function pointer for monitor function */
         mov   lr, pc /* Save the return address */
         bx    ip /* Jump into the monitor function */
    • We think one problem could happen, the ARM ROM code is compiled with a specific compiler which is not same as armclang. We are not passing the arguments as per the expected format of that particular compiler so we are getting this error.
    • Do you have any guideline for calling the monitor function from an assembly code?