This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28375S: 求助fpu32除法执行错误,谢谢

Part Number: TMS320F28375S
Other Parts Discussed in Thread: C2000WARE

尊敬的工程师您好:

我再使用fpu32的时候遇到了一个问题,我发现在系统启动之前,也就是在main函数中的BIOS_start函数启动之前,不能进行正常的除法运算,除法运算不执行,得到的结果是0。但是bios启动之后,又可以正常工作。是什么原因呢,配置如下,谢谢

应用的库是cla1_math_library_fpu32.libs   因为CLA需要函数

 

Int main()

{

    // Step 0. Copy Key Code from Flash into RAM 

    memcpy((uint16_t *)&RamfuncsRunStart, (uint16_t *) &RamfuncsLoadStart, (unsigned long) &RamfuncsLoadSize);

    // Copy over code from FLASH to RAM        

    memcpy(&Cla1funcsRunStart, &Cla1funcsLoadStart, (Uint32)&Cla1funcsLoadSize);

    memcpy(&Cla1mathTablesRunStart, &Cla1mathTablesLoadStart, (Uint32)&Cla1mathTablesLoadSize);

 

    //例如有些事中就没有使用,那么就应该把他禁止

    //这个函数里面还增添了将SPI SCI McBSP的时钟输入提高到200MHz

    PeripheralsClocksInit();  

    CLA_configClaMemory();   

    CLA_initCpu1Cla1();

 

    GpioInit();

    DELAY_US(100000);

    AllPeripheralsInit();         //把所有的外设初始化

    DELAY_US(100000);

    DYNRegisterInit();            //把寄存器都读取出来这里面有浮点数除法,计算不正确

   

    BIOS_start();    /* does not return */

 

    return(0);

}

 

Void SystemInitTaskFxn(UArg a0, UArg a1)

{

    DYNRegisterInitCalc();  //这里也有浮点除法,但是可以计算正确

    PlayMusic(0,2);         //播放开机声音

}