This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28054M PFC PGA gain not changing

Other Parts Discussed in Thread: DRV8305

I've got my own board with the F28054M micro and the drv8305, I'm having trouble with my resistance readings in lab 2b. they come out x1000 from what I expect and then it fails the identification. I can only assume it's my current signals that go thru the PGA's that are not working. The supply voltage reads correct.

I've isolated the pfc pga channel  "B7" since its easier for me to test,  it read's correctly for a gain of 3V/V. But when I change the gain via the "AMPPFC_GAIN " it doesn't change the output. and when i read this register in the debugger it reads as 0. and when I try edit it in the debugger it doesn't change either. Is this the correct way to change it?

When I change "AMPM1_GAIN" the debugger reads back what I've set, but I haven't been able to confirm what's coming out change's gain. I need to look into how to set one phase on permanently to get a constant current to read

void HAL_setupAfe(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;


// enable the PGA amplifiers
AFE_enablePGA(obj->afeHandle, (AFE_PGAEN_e)(AFE_AMPA1EN \
| AFE_AMPA3EN \
| AFE_AMPB1EN \
| AFE_AMPB7EN));
ENABLE_PROTECTED_REGISTER_WRITE_MODE;

obj->afeHandle->AMPM1_GAIN = 0x0000; // set gain A1, A3, B1 all to x3 // 0x00 = x3 gain, 0x10 = x11 gain
// bxx10xx10xx10 // 001000100010 ==0x222
obj->afeHandle->AMPPFC_GAIN = 0x0002; // set gain A1, A3, B1 all to x11 //TODO: check

//TODO: enable filters?

DISABLE_PROTECTED_REGISTER_WRITE_MODE;

return;
}

  • It took me a while (when setting up tripzone) to figure out that in hal.c, you first need to run CLK_enableAfeCompClock, then run HAL_setupAFE, and do this before running HAL_cal as that will lock some AFE registers. I did not check if the PGA settings behave similar, so could be that this is not helping at all.
    Harry