Hello Frank,
I am the MCU expert and I will try to answer your other questions.
There will be no mention of the BEMF_A, B, C inputs since they are not used in KMS. Since they are not used the table in the KMSUG will be the ony inputs you need to worry about in your design.
The HVP platform was designed to be used for a number of different motor types and reference designs. KMS using only what it needs to control the motor. NXP provides reference designs for customer who have extensive motor control experience and we use the HVP platform as an evaluation platform for quite a few of these reference designs.
The ADC pins are defined in kms_hw.h; The file is in the {.project\board\} folder.
Below are the default defines which show the board mapping. I have place a note in [ ...] with the pin mapping on the 64 pin KV31F256. Note that the DP0 and DP3 inputs can be used in single ended mode.
The way the Kinetis V pin mapping works with the ADC inputs is that a input pin can be sampled by either or both ADCs.
Take Pin 9: It is a dedicated ADC input pin that can be used as a differential input or a single ended input. It can be ADC0_DP0 and or ADC1_DP3
On pin 35: The ADC0_SE8 and or the ADC1_SE8 can sample the input pin.
/**
* @def ADC0_SAMPLEA_CHANNEL
* @brief Channel to sample for motor control on ADC 0 Sample A
* Phase A Current
*/
#define ADC0_SAMPLEA_CHANNEL (8u)
[this corresponds to pin 35 ADC0_SE8 on the KV31F256VLH part ]
/**
* @def ADC0_SAMPLEB_CHANNEL
* @brief Channel to sample for motor control on ADC 0 Sample B
* DC Bus Voltage
*/
#define ADC0_SAMPLEB_CHANNEL (12u)
[this corresponds to pin 37 ADC0_SE12 on the KV31F256VLH part ]
/**
* @def ADC1_SAMPLEA_CHANNEL
* @brief Channel to sample for motor control on ADC 1 Sample A
* Phase B Current
*/
#define ADC1_SAMPLEA_CHANNEL (0u)
[this corresponds to pin 11 ADC1_DP0 on the KV31F256VLH part ]
/**
* @def ADC1_SAMPLEB_CHANNEL
* @brief Channel to sample for motor control on ADC 1 Sample B
* Phase C Current
*/
#define ADC1_SAMPLEB_CHANNEL (3u)
[this corresponds to pin 9 ADC1_DP3 on the KV31F256VLH part ]
Filters:
The RC input filters are designed to minimize the noise injection from the motor. The components are sized based on the experience of the hardware designers and correspond to the expected maximum PWM rate of under 20-30 KHz. Without the filters the feedback signal might be useless to the control algorithm.
Regarding The V_in going to 2 pins. The software for KMS does not use these inputs - it uses the DC_Bus_input pin 37- ADC0_SE12.
NXP's other reference designs program the ADC to sample V_in and to use the Comparator input to engage the over-voltage shunt resistor terminals. The HVP also has a built in comparator to engage the over-voltage resistor without the use of the MCU.
ANSWER to BRegardsing R
NMI: The MCU has a pin labeled NMI. If not specifically disabled by the software a low on this input will result in the NMI interrupt vector fetch and trying to execute what ever code is there. The pin can be set to be a PORTA4 input or output. If it is re-purposed for another pin function then the NMI functionality is disabled.
The Relay Line: KMS does not use the Relay. This is controlling the PFC input and KMS does not include the PFC software drivers. If you require PFC then I can direct you to a reference project you can use to include into the KMS project. (Note that I have not done this before myself, but I am told it is possible).
I hope this helps.
Regards,
Philip Drake