你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

st-img
chrome
st-img
firefox
st-img
safari
st-img
ie8及以上
shequ.stmicroelectronics.cn
  • ST意法半导体官网
  • STM32中文官网
  • ST全球论坛
登录/注册
  • 首页
  • 技术问答
  • 话题
  • 资源
  • 创客秀
  • 视频
  • 标签
  • 积分商城
  • 每日签到
在路上…1

在路上…1

 

回答数 0 关注数 0
关注 私信
  • 动态99
  • 提问
  • 回答0
  • 创客秀 0
  • 分享 0
  • 关注0
3 回答

[STM32G0]Keil仿真一下再退出仿真程序才运行正常

STM32G0
butterflyspring butterflyspring 回答时间: 2019-6-25 17:12

搞定了就好

赞0
21 回答

STM32L151C8T6A的板子 自己画的 串口乱码

STM32L1
七哥 七哥 回答时间: 2019-3-29 13:48

你得用异步串口

赞0
15 回答

ST FOC5.x电机库 电流值如何转换为真实电流呢?

未设置标签
xiaozhou       xiaozhou       回答时间: 2021-1-6 13:42

stm32gxx 发表于 2020-8-26 09:00 用在相电流采样的ADC分辨率是12位,配成左对齐,意味着adc数据左移4位,相当于乘于16倍,ADC出来的数据肯定 ... 这个好像不是吧,左对齐需要移一位,剩下15位,电流采样是注入组 应该是16位,左对齐移一位,数据是16位来存储,低四位为0---2020.1.8

赞0
12 回答

求HAL库例程

未设置标签
wls151 wls151 回答时间: 2020-8-3 10:57

可以,我也这个路径

赞0
12 回答

STM32 FOC5.2电机库中中的电流采样如何改为反向放大

未设置标签
在路上… 在路上… 最优答案 回答时间: 2019-1-24 15:40

结帖了,我的思路是正确的,先是硬件调坏了一块 后是电机烧了一个,调到怀疑人生。现在把改后的代码贴出来,方便大家查阅 void R3HD2_GetPhaseCurrents( PWMC_Handle_t * pHdl, Curr_Components* pStator_Currents ) {   uint8_t bSector;   int32_t wAux;   WMC_R3_HD2_Handle_t * pHandle = (PWMC_R3_HD2_Handle_t *) pHdl;   /* Deactivate TIMx CH4 to disable next triggers using bit-banding access */   *(uint32_t*) (pHandle->wTIMxCH4_BB_Addr) = 0u;   /* Reset the SOFOC flag to indicate the start of FOC algorithm*/   pHandle->bSoFOC = 0u;   bSector = (uint8_t) pHdl->hSector;   switch ( bSector )   {   case SECTOR_4:   case SECTOR_5:     /* Current on Phase C is not accessible     */     /* Ia = PhaseAOffset - ADC converted value) */     wAux = (int32_t)( ADC1->JDR1 );     wAux *= 2;     wAux = wAux - (int32_t)( pHandle->wPhaseAOffset ) ;     /* Saturation of Ia */     if ( wAux < -INT16_MAX )     {       pStator_Currents->qI_Component1 = -INT16_MAX;     }     else if ( wAux > INT16_MAX )     {       pStator_Currents->qI_Component1 = INT16_MAX;     }     else     {       pStator_Currents->qI_Component1 = (int16_t) wAux;     }         /* Ib = PhaseBOffset - ADC converted value) */     wAux = (int32_t)( pHandle->pParams_str->ADCx2->JDR1 );     wAux *= 2;     wAux = wAux - (int32_t)( pHandle->wPhaseBOffset ) ;     /* Saturation of Ib */     if ( wAux < -INT16_MAX )     {       pStator_Currents->qI_Component2 = -INT16_MAX;     }     else if ( wAux > INT16_MAX )     {       pStator_Currents->qI_Component2 = INT16_MAX;     }     else     {       pStator_Currents->qI_Component2 = (int16_t) wAux;     }     break;       case SECTOR_6:   case SECTOR_1:     /* Current on Phase A is not accessible     */     /* Ib = PhaseBOffset - ADC converted value) */     wAux = (int32_t)( ADC1->JDR1 );     wAux *= 2;     wAux =  wAux - (int32_t)( pHandle->wPhaseBOffset ) ; //Ib     /* Saturation of Ib */     if ( wAux < -INT16_MAX )     {       pStator_Currents->qI_Component2 = -INT16_MAX;     }     else if ( wAux > INT16_MAX )     {       pStator_Currents->qI_Component2 = INT16_MAX;     }     else     {       pStator_Currents->qI_Component2 = (int16_t) wAux;     }     /* Ia = -Ic -Ib */     wAux = (int32_t)( pHandle->pParams_str->ADCx2->JDR1 );     wAux *= 2;     wAux = (int32_t) pHandle->wPhaseCOffset - wAux;  //Ic     wAux -= (int32_t) pStator_Currents->qI_Component2; //-Ic-Ib wAux = -wAux-pStator_Currents->qI_Component2     /* Saturation of Ia */     if ( wAux > INT16_MAX )     {       pStator_Currents->qI_Component1 = INT16_MAX;     }     else if ( wAux < -INT16_MAX )     {       pStator_Currents->qI_Component1 = -INT16_MAX;     }     else     {       pStator_Currents->qI_Component1 = (int16_t) wAux;     }     break;       case SECTOR_2:   case SECTOR_3:     /* Current on Phase B is not accessible     */     /* Ia = PhaseAOffset - ADC converted value) */     wAux = (int32_t)( ADC1->JDR1 );     wAux *= 2;     wAux =  wAux - (int32_t)( pHandle->wPhaseAOffset ) ;     /* Saturation of Ia */     if ( wAux < -INT16_MAX )     {       pStator_Currents->qI_Component1 = -INT16_MAX;     }     else if ( wAux > INT16_MAX )     {       pStator_Currents->qI_Component1 = INT16_MAX;     }     else     {       pStator_Currents->qI_Component1 = (int16_t) wAux;     }     /* Ib = -Ic -Ia */     wAux = (int32_t)( pHandle->pParams_str->ADCx2->JDR1 );     wAux *= 2;     wAux = (int32_t) pHandle->wPhaseCOffset - wAux;     wAux -= (int32_t) pStator_Currents->qI_Component1;     /* Saturation of Ib */     if ( wAux > INT16_MAX )     {       pStator_Currents->qI_Component2 = INT16_MAX;     }     else if ( wAux < -INT16_MAX )     {       pStator_Currents->qI_Component2 = -INT16_MAX;     }     else     {       pStator_Currents->qI_Component2 = (int16_t) wAux;     }                          break;   default:     break;   }   pHandle->_Super.hIa = pStator_Currents->qI_Component1;   pHandle->_Super.hIb = pStator_Currents->qI_Component2;   pHandle->_Super.hIc = -pStator_Currents->qI_Component1 - pStator_Currents->qI_Component2; }复制代码

赞1
在路上…1 在路上…1


阅读作者更多的帖子

所在话题

参与活动

  • 滴滴押注社区团购,明确“投入不设上限,要做市场第一”

    线下 2020-10-16
  • 滴滴押注社区团购,明确“投入不设上限,要做市场第一”

    网络 2020-10-16
  • 滴滴押注社区团购,明确“投入不设上限,要做市场第一”

    网络 2020-10-16
  • 滴滴押注社区团购,明确“投入不设上限,要做市场第一”

    网络 2020-10-16
  • 滴滴押注社区团购,明确“投入不设上限,要做市场第一”

    线下 2020-10-16
  • 滴滴押注社区团购,明确“投入不设上限,要做市场第一”

    线下 2020-10-16