Other Parts Discussed in Thread: SFRA, C2000WARE
原本程序中中断函数有浮点数运算,但我又在main函数的while加入代码后出问题,问题如下:
1.在中断中加入浮点数的运算
开始时一RUN程序直接跑到ILLEGAL_ISR函数中
浮点数采用printf打印输出,但我把中断里面的涉及浮点数的代码删除就可以正常运行,这是怎么回事?
谢谢!
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.
这个问题,因为之前已经说过F28027是定点芯片,不支持浮点数运算。不知道你的程序里面是否有对浮点数做过处理?
如果上述问题已经处理,那么进入非法中断很有可能就是堆栈溢出了,因为printf函数占用的空间很大。试一下重新配置cmd和linker中的堆栈空间大小
有一个例程:C:\ti\c2000\C2000Ware\device_support\f2802x\examples\drivers\C2kLaunchPadDemo
另外可以看一下这个帖子:e2echina.ti.com/.../tms320f28035-c2000-printf