Skip to main content
Michael K
Senior III
June 13, 2024
Solved

Cannot Remap Pins

  • June 13, 2024
  • 1 reply
  • 2475 views

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.

 

    Best answer by cedric H

    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

    1 reply

    cedric H
    Technical Moderator
    June 14, 2024

    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

     

    Michael K
    Michael KAuthor
    Senior III
    June 17, 2024

    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.

    cedric H
    Technical Moderator
    June 19, 2024

    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