2023-12-08 01:57 AM
Solved! Go to Solution.
2023-12-11 03:11 AM
Hello @backb0ne,
I add a quick look on your stwb6 file.
The issue why you do not see HSO proposed among the Speed Sensing Mode Selection is because of the feature "Phase Voltage Sensing".
This feature is described in your board but the pins connected are the following:
"name": "PC4", -> ADC2
"name": "PA5", -> ADC2
"name": "PA4",-> ADC2
The phase voltage sensing requires at least 2 different ADCs. In your use case only ADC2 is connected.
If you connect one of the 3 signals to an ADC1 pin compatible, then you should see HSO presented by the WB.
Let me know if it is clear and if you succeed to select HSO.
Regards
Cedric
2023-12-08 07:52 AM
Hi @backb0ne ,
Could you attach to your post the json file you wrote?
I will check it for you. From what I can read, you did everything right.
Regards
Cedric
2023-12-10 02:19 PM
2023-12-11 03:11 AM
Hello @backb0ne,
I add a quick look on your stwb6 file.
The issue why you do not see HSO proposed among the Speed Sensing Mode Selection is because of the feature "Phase Voltage Sensing".
This feature is described in your board but the pins connected are the following:
"name": "PC4", -> ADC2
"name": "PA5", -> ADC2
"name": "PA4",-> ADC2
The phase voltage sensing requires at least 2 different ADCs. In your use case only ADC2 is connected.
If you connect one of the 3 signals to an ADC1 pin compatible, then you should see HSO presented by the WB.
Let me know if it is clear and if you succeed to select HSO.
Regards
Cedric
2023-12-11 06:22 AM
Hi @cedric H
My mistake !
I also found that
- voltage measurements have to be on two ADC, AND
- voltage measurement and current measurement of the same phase have to be on different ADC.
If point 2 is not respected, the MCU pin mapping will not show in the speed sensing config tab. MC workbench is not happy but does not give information.
I can generate the HSO code now. Thanks for your help.
I have an additional question, on the same project,
if HSO is selected, I can individually change the ADC channel of the current sensing (internal or external Opamp).
However, when HSO is not selected, the ADC channel are grouped, and on current shunt is read by two ADC. But for my project, I have in the second case a warning at code generation: - Main Config : These peripherals still have some not configured or wrong parameter values: [ADC2]
2023-12-11 09:31 AM
Hi @backb0ne,
The point 2 is a limitation in the MCSDK 6.2.0, and will be remove in the patch release MCSDK 6.2.1 coming out December 13th.
We know that the MC Workbench is currently not verbose enough. This is a point we will address in the next feature release planed end of March. (6.3.0).
To answer your additional question, in our legacy implementation we sample only 2 phases out of the 3. But to be more accurate, we force the sampling of the 2 phases simultaneously with 2 ADCs. This implies that one of the 2 ADCs must be able to sample 2 phases.
Now, the warning you see on the code generation is an issue we discovered too late to fix it on the 6.2.1. It occurs when we generate a non HSO project with the Hardware Variant ThreeShunt_RawCurrents_Differential_ExternalGain_FilteredADCInput.
Regards
Cedric
2024-01-11 01:58 AM
I have a BLDC controller / ESC design based on the STM32G473CEU, using in-phase shunts (and an external 50x bi-directional OPAMP). How can I make this design compatible with ZeST and HSO?
Currently the ADCs are used as following:
ADC1: VM / bus voltage; 2 extra (low speed) voltage inputs and several NTCs
ADC2: Phase A voltage & Current
ADC3: Phase B voltage & Current
ADC4: Phase C voltage & Current
Would above setup work? If not, what should be changed?
What about filtering?
VM currently has a fixed first-order low pass filter set at 1.5kHz cut-off. Which cut-off frequency would be suitable?
The phase current and voltage use a similar low-pass filter, but include an analog switch to enable extra capacitance. Their cut-off frequency is ~12kHz and 150kHz depending on the switch state (current and voltage can be switched as separate groups). Are these suitable?
Is there an application note or hardware design manual for these algorithms?