cancel
Showing results for 
Search instead for 
Did you mean: 

Broken/odd pin mapping when configuring BMS63CHAIN for C4MINI1 board

hno-wires
Associate II

I am trying to configure BMS63CHAIN component on AEK-MCU-C4MINI1 board connected to an AEK_POW_BMSNOTX but the allocated pin mapping created by the tool does not match the C4MINI1 board connectors.

I tried following the AutoDevKit chapter in um3185 Getting started with AutoDevKit battery management system (BMS) evaluation boards:

1. Open AutoDevKit Studio 2.6.1
2. Create New SPC5 Application using SPC58ECxx Platform Component RLA
3. Add SPC58ECxx Init Package Component RLA
4. Add SPC58ECxx Low Level Drivers Component RLA
5. Add AutoDevKit 4 Mini Init Package Component
Note: Getting Started guide mentions adding AutoDevKit Init Package, but I can not select this together with 4 Mini Init. Seems to be mutually exclusive.
6. Add AEK-POW-BMS63CHAIN component
7. Open AEK-POW-BMS63CHAIN -> AEK_POW_BMSCHAIN[0]
8. Select Node type: AEK_POW_BMSNOTX
9. Seletct dspi: dspi0, cs0

Go back to the AEK-POW-BMS63CHAIN component and press Allocate button.

Go to SPC58EC 4M Mini board view. This looks strange. Cannot scroll down to view the AEK-POW-BMSNOTX wiring allocation. If I zoom out then I can see the connection wiring table and it is a mess. Expected SPI connections to all be on CN12 (dspi0), and NTC and FAULT to be at meaningful locations.

CS0: CN1-1
MISO: CN12-4 (ok)
MOSI: CN2-6
SCK: CM12-3 (ok)
FAULT: X
eNTC1: X
eNTC2: CN16-13
eNTC3: X
eNTCb: CN16-14

Why is it selecting random pins like this?

Can I somehow adjust the pin mapping to some more sane use of the connectors?

Update: I now tried to import the AEK-MCU-C4MINI - AEK_POW_BMSCCTX_GUI_application for discovery example application, and the initial import shows meaningful pin mapping, but if I try to make any changes then the pinmapping gets just as broken. Simply pushing "Deallocate" and then "Allocate" after importing the sample is sufficient to break the pin mapping.

1 ACCEPTED SOLUTION

Accepted Solutions
Max VIZZINI
ST Employee

Hi,

BMSCHAIN allocation on AEK-MCU-C4MINI is not implemented. 

It works only with AEK-MCU-C4MLIT1.

In any case, you have the freedom to move the pins directly from the Pinmap after the allocation. Just to avoid to change the code, keep the exact name and pin configuration as allocated.

Best Regards,

AutoDevKit Team

View solution in original post

7 REPLIES 7
Max VIZZINI
ST Employee

Hi,

BMSCHAIN allocation on AEK-MCU-C4MINI is not implemented. 

It works only with AEK-MCU-C4MLIT1.

In any case, you have the freedom to move the pins directly from the Pinmap after the allocation. Just to avoid to change the code, keep the exact name and pin configuration as allocated.

Best Regards,

AutoDevKit Team

Ok.

Is there any way to automate the pin assignments to avoid having to redo it by hand on every little change to the BMSCHAIN parameters?

Hi, 

Unfortunately, not from your perspective, it has to be done from our side at coding level....

Sorry!

Best Regards,

AutoDevKit Team

I see how to handle the SPI and GPIO signals.

But how do I handle the four external ADC signals: NTC1, NTC2, NTC3 and NTCb pin allocations. These map to allocated ADC channels on the MCU and I guess more changes is needed beyond just moving these signals in the PinMap editor?

hno-wires
Associate II

I will order a AEK-MCU-C4MLIT1 and another AEK_POW_BMSNOTX. Had a small accident and the magic smoke escaped from the AEK-MCU-C4MINI1 and seems the BMSNOTX also got killed in the process.

SRomeo
ST Employee

Hi there,

The allocation process is allocating some pins as "X".
This means that, automatically, were allocated MCU pins not wired to C4MINI connectors (which causes your issue) but also every needed peripheral's configuration. Take each configuration detail as a reference.

The golden rule to make a system work is that "all the pins displayed on the connection matrix MUST be connected". So your GPIOS and NTCs have to be allocated manually to some available MCU pin.

To do that you should take a look to the AEK_MCU_C4MINI extended connector, which can be also found on the C4MINI User Manual.

SRomeo_8-1760963220197.png

The pins you want to allocate are ADCSAR, so you should search in the scheme above which MCU pin are allocable as ADC.


When you find it:

SRomeo_11-1760964490109.png

In red you can see which P"x"y" combination configurable as ADC (i.e. PG5)

Then openSRomeo_2-1760962392525.png

In the top left of the screen search for the pins you are looking for: 

SRomeo_9-1760964287354.png

our C4MINI should have every pin allocated already, so you should see it highlighted in green.

If you click the pin, you will find it highlighted on the ADCSAR Outline window:

SRomeo_12-1760964798434.png

NOW, left click on the pin previously displayed with the "X" and copy the name from the General setting window:

SRomeo_5-1760962392545.png (GPIO example)


Then right click on the PIN and deallocate it, selecting NOT USED:

SRomeo_6-1760962392386.png


Now deallocate the PG5 (if already allocated) and allocate it once again, as:

SRomeo_13-1760965114605.png

Make sure to paste the name you copied before!
Remember the name of the peripheral (ADCSAR12b_S) and the Channel number.

Now by clicking on lowleveldrivers from the project explorer, select SARADC Settings, and check if the corresponding SARADC is enabled:

SRomeo_14-1760965337439.png

SRomeo_15-1760965355365.png

SRomeo_17-1760965436171.png

then create a new SARADC Configuration (if you are creating from scratch) or use the one generated, making sure to have the following configuration:

SRomeo_18-1760966339431.png


And the correct channel selected:

SRomeo_19-1760966388225.png


Repeat the procedure also for other ADCs, then Save allclean and compile.
Your application should no more have "X" pins allocated and the correct ADC configurations.

Best Regards
AEK team

Thanks for the detailed response.  How to remap pins was clear from the previous responses. But I was missing the SARADC Settings part. Now it is a bit clearer. Thanks!

And then there is the annoying feature that one can not easily view the connection matrix in the C4MINI1 board view. The screen constantly scrolls up to the top when I try working with C4MINI1. Works fine if I use a C4MLIT1 based design. Looks like the graphics is using too much screen space so the scrollbar does not know what to do.