cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Remap Pins

Michael K
Senior III

Cannot Remap Pins

My design (custom PCB) is based on the B-G431B-ESC1. I'm trying to swap the V and W PWM channels. I cloned the B-G431B-ESC1 board and just swapped the pin definitions for the V and W high and low channels. No errors during generation or build. However, the motor doesn't turn and the CubeMX IOC file has those four pins locked (purple) in reset state. This issue existed in V6.2.1 and I hoped it would be resolved in V6.3.0 but nope. My CubeMX is fully up to date (6.11.1) and I'm using FW 1.5.2 (recommended).

MichaelK_0-1718312875775.png

Frustratingly, I can't even choose to swap V and W channels on the current sense side, because I later get an error saying it's not compatible with the FOC algorithm.

 

Embedded UI/UX Consulting: cadenza.design
1 ACCEPTED SOLUTION

Accepted Solutions

Hi Michael,

I am glad you can rework your board manually. In the next patch release, 6.3.1, we will remove the limitation forcing you to connect Phase U to CH1 V to CH2, and W to CH3. I think without this restriction you will be able to swap your PWM channels and make them aligned with your current sensing. 

Best Regards

Cedric

View solution in original post

6 REPLIES 6
cedric H
ST Employee

Hello @Michael K,

By definition Pin U must be connected to Channel 1, Pin V to channel 2, Pin W to channel 3. This is not an issue.

What is important is that in your board definition current U is controlled by Phase U, Current V by phase V, and Current W by phase W.

In MCSDK 6.3.0 you should not see any more the generic "compatible with FOC algorithm issue" message, but a more accurate description of the real issue.

Could you please attach your board description that does not work after the swap of V and W current signals.

I will check how can I help

Cedric

 

Hi Cedric.
I went back to the docs and found that indeed, the phase channels are required to match U,V,W with 1,2,3. However, you have a typo in the documentation (both V and W are pointed to CH2 and CH2N)


As for current sensing, the message when creating the project with the swapped V and W channels is: 

No proper path for motor control signals was found for the following mandatory features:
 - Current Sensing

 

Please see attached board definition, and ConnectAlgo Log. The board definition was a JSON file, but I had to rename it to TXT to upload it to the forum.

Thanks.

Embedded UI/UX Consulting: cadenza.design

Hi @Michael K 

Thanks for your feedback. Indeed there is a typo in the wiki. V phase must be controlled by CH2, and W by CH3.

I reproduced your issue with your attached board description. The Workbench does not propose you any solution because we strictly limited the possible OPAMPs IP to OPAMP1, OPAMP2, OPAMP3. We did that to guarantee that we can generate and test this configuration (the one from ESC-G4). Swapping V and W will lead to OPAMP1, OPAMP3, and OPMAP2. If I authorize this configuration in connectAlgoParameters.json, then the Workbench can use your board, but unfortunately, the cubeMX IOC generation will not be successful. I open a ticket on our side to fix this limitation.

Anyway, your board without swapping the current signals name must be functional even if the name of the phases is not aligned with the serigraphy. Therefore, I do not see this limitation as blocking. Am I right?

Regards

Cedric

Hi Cedric, thanks for your attention to this matter.

The board is not functional as-is. When attempting to start, the motor thunks and bounces off the current limiter of my supply - I expect that when the algorithm attempts to drive V and W, the corresponding current waveform it reads back is W and V (swapped), which confuses it.

My reason for attempting to swap either the PWM channels or the current sense channels is so that the current and drive signals agree with each other again. However, I have been manually reworking boards to physically swap the pins, which is an adequate solution for the low quantities of prototypes I have now.

Embedded UI/UX Consulting: cadenza.design

Hi Michael,

I am glad you can rework your board manually. In the next patch release, 6.3.1, we will remove the limitation forcing you to connect Phase U to CH1 V to CH2, and W to CH3. I think without this restriction you will be able to swap your PWM channels and make them aligned with your current sensing. 

Best Regards

Cedric

Thank you. Looking forward to the patch. Is there a timeline I can expect to see this released?

Embedded UI/UX Consulting: cadenza.design