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.

F28035 in Standalone mode

Hello,

Am working on F28035 standalone mode, using PM_Sensorless project in DRV8312-C2-Kit. My standalone mode seems it is working fine, but When i run from the debugger, driver reset error is happening because of the ePWMA AQCTLA initialization.

when i reach      /* Init Action Qualifier Output A Register for EPWM1-EPWM3*/        \
                             EPwm1Regs.AQCTLA.all = AQCTLA_INIT_STATE;                            \ this part of code in Init_PWM_Macro, am getting driver reset error.

1. why reset is happening in initialization stage itself?

2. am using up-down count mode means AQCTLA_INIT_STATE = 0x60 ---CAU-set and CAD-reset

thank you
                   

  • Hi Mohan,

    I could be wrong but I doubt this has anything to do with the ePWM. Could you check what happens on the XRS line of the the MCU. If you see it periodically being pulled low, your watchdog is resetting the device.

  • Hello vishal,

          I dont know how to check XRS pin in DRV8312-C2-Kit.

    1) for standalone mode what are all the sections should be in flash and RAM, i copied InitFlash and .econst from Flash to RAM during runtime, anything else i need to copy like .text, .cinit etc?

    2) Is all control cards are configured to boot on SCI connection, because my program starts running (RED LED blinking) only when i connect USB to the board, if i remove the power supply and USB, and connect only power supply the program wont run.

    3) the memory usage by ROM in .map file is shown as 0000000, what does indicate.

    4)memory locations 0xD00 = 0x55AA and 0xD01 = 0x03 are showing, it means standalone mode right?

    5) As soon as i run my project (PM_Sensoreless) reset error is happening, may be this is because of Watchdog timeout, but i dont know how to check this.

    6) Am using CCSV5 free version, not licensed version. am not able to find "tool" menu in this.

    Thank you for replying...

  • Hi Mohan,

    mohan kumar said:
      I dont know how to check XRS pin in DRV8312-C2-Kit.

    What I meant earlier was to probe the XRS pin on a scope and see if it is being pulled down periodically. Im willing to bet that your device isnt booting to FLASH, instead, it is going to one of the other boot modes, idles for a bit, and then the watchdog kicks in and resets the device.

    mohan kumar said:
    2) Is all control cards are configured to boot on SCI connection, because my program starts running (RED LED blinking) only when i connect USB to the board, if i remove the power supply and USB, and connect only power supply the program wont run.

    They should be configured for "GetMode". Make sure these pins are configured correctly. There should be a dip switch that controls the voltages on these pin. You should be able to find it on the schematic .

         a. GPIO37/TDO is pulled HIGH
         b. GPIO34 is pulled HIGH

    This condition puts the device into "GetMode". Once in this mode the device will look at the values of OTP_KEY and OTP_BMODE in FLASH (not 0xD00 and 0xD01 which are EMU_KEY and EMU_BMODE). These locations are factory programmed to default to FLASH. So execution should jump to FLASH automatically if the pins are configured correctly

    mohan kumar said:
    4)memory locations 0xD00 = 0x55AA and 0xD01 = 0x03 are showing, it means standalone mode right?

    When you connect the USB(jtag for xdsv100) you are putting the device into emulation mode. In this mode it looks up EMU_KEY(0xD00) and EMU_BMODE(0xD01) and you can configure these registers to "simulate" standalone mode but once you unplug the JTAG these locations are not referred on reset. You can use this mode, with the usb connected, to simulate standalone and step through your code and find out where it gets stuck.

  • Thanks for the reply

    My code is working fine in standalone mode, but When i apply the power the controller is not running, it requires USB connection to Run. I can remove the USB after the controller is running. Please tell me the reason. I need to run my code as soon as i connect the power supply not after connecting the USB.

    The power stage reset was because of the BASE_CURRENT = 8.6, now i changed it to lower current of 5.6, now the reset is not happening, Please give some information about BASE_CURRENT in PM_Sesorless_settings.h