Quantcast
Channel: Motor drivers forum - Recent Threads
Viewing all articles
Browse latest Browse all 21930

RE: DRV8711 write issue after sleep

$
0
0

Hello Rick,

one thing I'd like to add ... make sure that the register you use for testing is set to different values in sleep phase and afterwards. Otherwise you will not see the effect. Here is my test:

    DRV8711_Sleep(true);
    DRV8711_WriteRegister(DRV_REG_TORQUE, 0x111);
    DRV8711_WriteRegister(DRV_REG_TORQUE, 0x111);
    DRV8711_WriteRegister(DRV_REG_TORQUE, 0x111);
    //DRV8711_ReadRegister(DRV_REG_OFF);
    DRV8711_Sleep(false);

    DRV8711_WriteRegister(DRV_REG_TORQUE, 0x112); // this is where the magic happens ;)

void DRV8711_Sleep(bool sleep){
    if (sleep){
        HAL_GPIO_WritePin(DRV_SLEEPN_GPIO_PORT, DRV_SLEEPN_GPIO_PIN, GPIO_PIN_RESET);
    }else{ // wake up
        HAL_GPIO_WritePin(DRV_SLEEPN_GPIO_PORT, DRV_SLEEPN_GPIO_PIN, GPIO_PIN_SET);
        time_DelayMs(3); // wait at least 1ms
    }
}

Cheers, Michael


Viewing all articles
Browse latest Browse all 21930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>