You are here

Support for AMC1301 powered from bootstrap

3 posts / 0 new
Last post
antonchromjak
Offline
Last seen: 11 months 1 week ago
Joined: 2017-09-05 13:47
Posts: 57
Support for AMC1301 powered from bootstrap

Hi,

I made custom board that has AMC1301 powered from mosfet bridge driver. Problem is that when start it calibrates current without AMC1301 powered and then it reports invalid currents. I tried power all AMCs from battery with diode and it worked without problem. I think this should by fixable by software.

Is it possible to make some extension that will at freewheel operation switch one lower mosfet ON? This should power all AMCs.

I tried some changes in code but I only keep blow fuses.

Thanks,

Anton

antonchromjak
Offline
Last seen: 11 months 1 week ago
Joined: 2017-09-05 13:47
Posts: 57

This helped. But I'm not sure why. Any suggestions?

 

static void stop_pwm_hw(void) {
    #ifdef HW_HAS_AMC
        TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_OCMode_PWM1);
        TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Disable);
        TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Enable);
    #else
        TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_ForcedAction_InActive);
        TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Enable);
        TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Disable);
    #endif
    TIM_SelectOCxM(TIM1, TIM_Channel_2, TIM_ForcedAction_InActive);
    TIM_CCxCmd(TIM1, TIM_Channel_2, TIM_CCx_Enable);
    TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Disable);

    TIM_SelectOCxM(TIM1, TIM_Channel_3, TIM_ForcedAction_InActive);
    TIM_CCxCmd(TIM1, TIM_Channel_3, TIM_CCx_Enable);
    TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Disable);

    TIM_GenerateEvent(TIM1, TIM_EventSource_COM);

#ifdef HW_HAS_DRV8313
    DISABLE_BR();
#endif
    m_output_on = false;
}

antonchromjak
Offline
Last seen: 11 months 1 week ago
Joined: 2017-09-05 13:47
Posts: 57