ST意法半导体
直播中

庞琳

7年用户 210经验值
私信 关注
[问答]

PMSM FOC库是否支持在STM32F303RB上使用OPAMP3/4和ADC3/4进行单电机驱动?

你好,

PMSM FOC库是否支持在STM32F303RB上使用OPAMP3 / 4和ADC3 / 4进行单电机驱动?
我做了我自己的硬件,但似乎库仍然试图检查ADC1的一些标志,即使没有信号连接到ADC1也没有2。

PMSM手册说:OPAMP3 / OPAMP4对可以在基于STM32F303的项目中另外使用。
这“另外”是什么意思?这是第二个选择还是它支持第二个电机?
#pmsm-single-drive-adc34#opamp3  4#foc4.1#stm32f303

以上来自于谷歌翻译


以下为原文





Hello,

Does the PMSM FOC library support single motor drive using OPAMP3/4 and ADC3/4 on STM32F303RB?
I did my own HW like that but it seems that the library still tries to check some flags of ADC1 even if none of the signals are connected to ADC1 nor 2.

PMSM manual says: the pair OPAMP3/OPAMP4 can be used additionally in a project based on STM32F303.
What does this ''additionally'' mean? That it's the second option or that it supports second motor?  
#pmsm-single-drive-adc34 #opamp34 #foc4.1 #stm32f303

回帖(7)

庞琳

2019-3-22 06:59:13
向上!
 
ST人们应该不难回答这个问题......
 
我现在订购了一个新的PCB,其中电机在OPAMP 1/2引脚上,但为了清楚起见,请回答这个问题。

以上来自于谷歌翻译


以下为原文





Up!

It shouldn't be hard to answer this question for ST people...

I now ordered a new PCB where motor is on OPAMP 1/2 pins but for sake of clarity please answer this question.
举报

张秀兰

2019-3-22 07:19:05
再见,
 
 选项是使用OPAMP3 / 4和ADC3 / 4而不是1和2用于使用STM32F303的三个并联单电机。
 当然,您还需要将总线电压采样(以及温度反馈)映射到ADC3或4。
 因此,从理论上讲,对于ADC1和2不存在依赖性......但它是一种通常不常用的配置,并且一些错误可以隐藏在内部。
 
 再见
 梁咏琪

以上来自于谷歌翻译


以下为原文





Ciao,

The option is to use OPAMP3/4 and ADC3/4 instead of 1 and 2 for three shunt single motor using STM32F303.
Of course you need also to map the Bus Voltage sampling (and so the temperature feedback)  to ADC3 or 4.
So teoretically there shaould be no dependency for ADC1 and 2... but it is a configuration that usually is not common used and some bugs can hide inside.

Ciao
Gigi
举报

庞琳

2019-3-22 07:28:13
我有三个分流拓扑结构,不使用总线电压和温度。 ADC1 / 2用于附加传感器(不适用于电机)。无论如何我还没有使用那些传感器,所以没有什么不应该使用ADC1 / 2。为了测试我将映射的总线电压和温度映射到随机备用ADC3 / 4引脚,但是库仍然对ADC_GetFlagStatus进行了大量调用。通过CPU寄存器,我知道它寻找要设置的ADC1注入序列转换标志。但由于ADC1外设未处于活动状态,因此它无法调用该功能。这让我觉得可能有一些硬编码的ADC1使用?

以上来自于谷歌翻译


以下为原文





I have three shunt topology and bus voltage and temperature are not used. ADC1/2 are left for additional sensors (not for motor). Anyway i don't use those sensor yet so nothing shouldn use ADC1/2. For testing i mapped bus voltage and temperature to random spare ADC3/4 pins also, but the library still made lot of calls to ADC_GetFlagStatus. By CPU registers i understood it looked for ADC1 injected sequence conversion flag to be set. But as ADC1 peripheral wasn't active then it got stuck in calling that function. That made me think that maybe there is some hardcoded ADC1 usage?
举报

张秀兰

2019-3-22 07:39:08
我没有看到(并且我没有记住)在这种配置中使用ADC1的任何特殊原因,所以我认为这是一个错误。
 
 我需要调查一下。
 如果您可以附加产生问题的WB配置,那么它可能很有帮助。
 而且如果你可以在检查标志的例程中停止FW时拍摄“调用堆栈”的快照,它可以提供很多帮助。
 
 谢谢
 再见
 梁咏琪

以上来自于谷歌翻译


以下为原文





I don't see (and I don't rember) any particular reason to use the ADC1 in such configuration, so I presume that is a bug.

I need to investigate.
If you can attach WB configuration that generate the problem, it can be helful.
And also if you can take a snapshot of the ''call stack'' when the FW is stopped inside the routine that checks the flag, it can help a lot.

Thanks
Ciao
Gigi
举报

更多回帖

发帖
×
20
完善资料,
赚取积分