完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我需要帮助。
我已成功构建(使用IAR)并在STM32303E评估板上运行V4.3 FOC项目。为此,我使用了标准的项目,经过几次出牙问题后,我全力以赴。 下一步是为我的应用程序旋转自定义板。在这一点上,我遇到了一些问题。重新配置所有内容后,它编译得很好并且加载确定但是在运行程序时,它似乎挂在一些不起眼的内存位置(见下文)。 我设计了一个基于NUCLEO-F303RE的定制PCB(SDK支持)。但是,我正在使用MCU STM32F303RB并通过FOC SDK将大多数引脚重新映射到适当和支持的引脚(参见附图)。除了引脚之外,主要区别在于我使用板载8MHz晶振作为时钟源 - 我相信Nucleo从电路板的st-link部分获取其时钟源。 以下是我到达目的地的过程: 使用ST Motor Control Workbench(附带.h文件)配置系统参数,将它们添加到下面的项目中。编译使用项目我改变了实际处理器的目标。我找不到合适的STM32F303用户项目所以我修改了项目在项目选项下>常规选项,我将设备更改为项目选项> C / C ++编译器>预处理器,我将''定义符号''改为项目选项>链接器>配置,我将链接器配置文件从build更改为Excluded库,并包含新编译的libraryExcluded文件,包括build和包含的fileThis编译好并上传,但在运行时总是崩溃并挂起。我不确定它是如何到达这个位置或它是什么。中断向量或?: 为了调试,我逐步完成了程序,直到它被绞死,我将崩溃点追溯到函数中。所以我假设初始化中的某些东西正在崩溃。进一步的步骤显示它似乎在启用时崩溃,我相信如果我试图进一步通过C代码,它将挂在这一点。如果我单步执行反汇编的代码,它似乎通过这个函数,但如果我让它在此后自由运行,它仍然会挂起。 我不知道如何调试这个问题所以我首先要检查是否有一些我在项目配置上做错了。感觉就像定时器/时钟源问题。我用探测器探测了晶体,我可以看到8Mhz波形看起来足够稳定,所以我不确定它是什么以及它为什么会进入那个奇怪的存储位置。 任何帮助,将不胜感激。 #stm32f#foc-4.3 以上来自于谷歌翻译 以下为原文 I need help please. I have successfully built (using IAR) and run V4.3 FOC project on an STM32303E Eval board. I used the standard included project for this and after a few teething problems, I got it all to work. The next step was to spin a custom board for my application. It is at this point I am having some issues. After re-configuring everything, it compiles fine and loads ok BUT when running the program, it seems to hang at some obscure memory location (see below). I designed a custom PCB based off of NUCLEO-F303RE (which is supported by SDK). However, I'm using MCU STM32F303RB and have remapped most of the pins to appropriate and supported pins by the FOC SDK (see attached schematic). Other than the pins, the main difference is that I'm using an on-board 8MHz crystal as the clock source - I believe the Nucleo gets its clock source from the st-link part of the board. Here is the process I took to get to where I am:
To debug, I stepped through the program until it hanged and I traced the crash point to the function in . So I assume something in the initialization is breaking down. Further stepping revealed that it seems to crash at the point of enabling which I believe is If I try to step any further through the C code, it'll hang at this point. If I step through the disassembled code, it seems to get through this function but will then still hang if I let it free run after this. I'm not sure how to debug this issue so I first wanted to check if there is something I've done wrong with the configuration of the project. It feels like a timer/clock source issue. I've probed the crystal with a scope and I can see the 8Mhz waveform which looks stable enough so I'm not sure what it is and why it goes to that wierd memory location. Any help would be appreciated. #stm32f #foc-4.3 |
|
相关推荐
1个回答
|
|
好。所以花了所有的时间准备一个详细的帖子....我发现了问题!叹。
出于绝望,我试图重新编译,因为这似乎最初对我有用。我根据需要更改了项目配置(例如,选择正确的设备,确保使用正确的MC库等)。编译后我把它加载到我的硬件和BAM它工作! 奇怪 - 我的设置方式与其他F302用户项目相同。 我开始调查了。我查看了两个项目中的地图文件,发现代码并不完全相同(正如人们预期的那样)。使用不同大小编译的函数之一: 我进一步调查并逐一比较项目选项。我注意到项目中缺少一个定义的符号(例如,那个没有工作的符号)。项目选项中定义的符号列表中缺少''。将此添加到崩溃的项目后,它开始起作用。现在比较地图文件显示两个项目的输出完全相同。 不确定如何不定义这个符号创建了坏代码所以很想听到有人在这上面。 简而言之,这是SDK中的一个错误,可能应该纠正。谢谢ST。 以上来自于谷歌翻译 以下为原文 OK. So after spending all that time preparing a detailed post.... I found the issue!!! Sigh. Out of desperation, I tried to recompile using the as this seemed to work for me initially. I changed the project configuration as required (eg. selecting correct device, making sure correct MC library is used etc). After compiling I loaded it into my hardware and BAM it worked!! Strange - I set it up the same way as for the other F302 user project. I started investigating. I looked at map files from both projects and noticed that the code was not exactly the same (as one would have expected). One of the functions compiled with a different size: I investigated further and compared the project options, one by one. I noticed that one defined symbol was missing in the project (eg. the one that was not working). ''was missing from the defined symbols list in project options. After adding this to the project that was crashing on me, it started to work. Comparing the map files now revealed exactly the same output from both projects. Not sure exactly how not defining this symbol created the bad code so would love to hear someones though on this. In short, this was an error in the SDK which probably should be rectified. Thanks ST . |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2568 浏览 1 评论
3191 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1761 浏览 1 评论
3586 浏览 6 评论
5962 浏览 21 评论
920浏览 4评论
1296浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
560浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1284浏览 3评论
1334浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-3 11:12 , Processed in 0.998898 second(s), Total 77, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号