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.

CCS/DRV8312-69M-KIT: Incremental encoder freezes control algorithm

Part Number: DRV8312-69M-KIT
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

Dear motorware team,

I am currently trying to compare the electrical position of the FAST estimator to the electrical position incremental encoder in Lab 20. I am using the QEP driver and the enc.c/enc.h module to read out the information of the encoder. The encoder is connected to J4. The code is running fine for about 10 seconds. After that the motor stops spinning and code composer freezes. If I disconnect the encoder then the algorithm with the same code does not freeze.

This also seems to happen to all the other labs as well. When I connect the encoder to J4 running Lab05a for example, the same thing happens: code runs fine for 10 seconds and then it freezes, even though it does not read out any encoder information. Have you ever encountered this issue?

The encoder I am using is the HEDM-5500 B12 (1000 CPR). Datasheet: http://www.mouser.com/ds/2/678/V02-1046EN_DS_HEDM-55xx_2014-11-20-909010.pdf

Kind regards,

Dat

  • Is CCS throwing an error in the console when your debugger freezes?

    Sean
  • What current consumption is the encoder? Did you meet the same problem if you don't change any code in lab5a or lab20?
  • Hi guys,
    Thanks for your quick reply. According to the datasheet, the encoder draws about 57 mA typical. Yes I have the same problem with all labs if I do not change any code and have the encoder connected. I am pretty sure I have the encoder connected in the correct way because the encoder module returns a nice sawtooth as position for the time it is running.

    @ in CCS I am getting the error:
    Trouble Reading Register PC:
    (Error -1142 @ 0x0)
    Device blocked debug access because it is currently executing non-debuggable code. Choose 'Rude Retry' to disable polite mode and force the operation.
    (Emulation package 7.0.48.0)

    EDIT:

    It looks like it is a hardware issue. The DRV8312EVM I was using seems to be faulty. I have replaced my DRV8312EVM board and now everything including the encoder is working fine.

    I have included pictures of the boards. The top picture is the faulty board, the bottom one is the one working fine. I think faulty board has the production number 0516T. The functioning board has the number 4312T. Do you have any idea why the faulty board crashes when I try to debug it with an encoder?