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.

TMS320F28027F: Configuring ADC channels in MotorWare

Part Number: TMS320F28027F
Other Parts Discussed in Thread: MOTORWARE

Hi,

I am starting to set up a new custom board based on the 027F and had a couple questions about setting up and configuring the ADC channels.

First, just wanted to double check my assumption that the IA current feedback is set up to be which ever current feedback is attached to PWM1A/B, IB->2A/B and IC->3A/B. Same for voltages.  I had some layout constraints, so at the moment what I am calling Phase A actually hooks into PWM3A/B.

Next, I have a have a couple additional signals to sample and was just wondering how best to integrate the sampling of those signals with the motorware project.  I have two analog triggers that control torque, an NTC temperature sensor near the MOSFETs and a hardware version feedback.

These are very low priority signals so they don't strictly need to be sampled/converted with the higher priority Current/Voltage feedbacks.  Is there a low priority ADC queue anywhere, or should I just add them to the existing queue?  The hardware signal only needs to be read once, we really don't need to waste time converting this every time we update currents/voltages.

Also, is there a low frequency background task set up to service the logic related to the triggers and temperature sensor?

Thanks,
Jim

  • I have found the Motorware_HAL_Tutorial PDF, I think this addresses most of the questions I have.
  • Hi James,

    Glad to hear that. Feel free to come back if you have further questions. Thanks.

    Best regards,
    Chen
  • Chen,

    I do have another related question.

    The way the HAL tutorial says to implement lower priority ADCs is to have their start of conversion trigger off the ADCINT that fires after the high priority conversions finish.  This way the conversion of these low priority ADCs does not effect the motor control loop at all.  I think this makes sense, but I am a little worried about what happens in the background (asynchronous) task.

    If I am implementing the logic for these ADCs in the main loop, is there anything to stop me from attempting to read a value from the result register as it is being updated?  The example code provided in the HAL tutorial does not appear to check for a conversion complete flag or anything of that sort.

    Would it be possible to implement a one shot conversion for all the low priority ADCs I have, then in the background loop could I check to make sure the conversion is complete, read out the data, then enable another conversion to happen after the high priority conversions are complete?

    Thanks,
    Jim