# Parameters of the BMS

This page will describe the variables of the BMS. \
There are 6 kind of parameters

1. The common battery variables
2. The calculated battery variables
3. The additional battery variables
4. The configuration variables&#x20;
5. The CAN variables
6. The hardware parameters&#x20;

{% hint style="info" %}
In the console (CLI) type "bms get all" to get all the parameters and its current value.

In the console (CLI) type: "bms help parameters" to get more info on the parameters.
{% endhint %}

## &#x20;The BMS parameter lists

### The common battery variables list <a href="#ref167459253" id="ref167459253"></a>

Table 1.       Common battery variables list

<table data-header-hidden><thead><tr><th width="127"></th><th width="68"></th><th width="105"></th><th width="231"></th><th width="91"></th><th width="70"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Unit</td><td>Datatype</td><td>Description</td><td>Default</td><td>RO/RW</td><td>No</td></tr><tr><td>v-out</td><td>V</td><td>float</td><td>The voltage of the BMS output</td><td>0</td><td>RO</td><td>0</td></tr><tr><td>v-batt</td><td>V</td><td>float</td><td>The voltage of the battery pack</td><td>0</td><td>RO</td><td>1</td></tr><tr><td>n-cells</td><td>-</td><td>uint8_t</td><td>Number of cells used in the BMS board</td><td>3</td><td>RW</td><td>2</td></tr><tr><td>v-cell1</td><td>V</td><td>float</td><td>The voltage of cell 1</td><td>0</td><td>RO</td><td>3</td></tr><tr><td>v-cell2</td><td>V</td><td>float</td><td>The voltage of cell 2</td><td>0</td><td>RO</td><td>4</td></tr><tr><td>v-cell3</td><td>V</td><td>float</td><td>The voltage of cell 3</td><td>0</td><td>RO</td><td>5</td></tr><tr><td>v-cell4</td><td>V</td><td>float</td><td>The voltage of cell 4</td><td>0</td><td>RO</td><td>6</td></tr><tr><td>v-cell5</td><td>V</td><td>float</td><td>The voltage of cell 5</td><td>0</td><td>RO</td><td>7</td></tr><tr><td>v-cell6</td><td>V</td><td>float</td><td>The voltage of cell 6</td><td>0</td><td>RO</td><td>8</td></tr><tr><td>i-batt</td><td>A</td><td>float</td><td>The last recorded current of the battery</td><td>0</td><td>RO</td><td>9</td></tr><tr><td>i-batt-avg</td><td>A</td><td>float</td><td><p>The average current since the last</p><p>measurement (period t-meas (default 1s))</p></td><td>0</td><td>RO</td><td>10</td></tr><tr><td>i-batt-10s-avg</td><td>A</td><td>float</td><td><p>The 10s rolling average current, updated</p><p>each t-meas, default 1000 (ms)</p></td><td>0</td><td>RO</td><td>11</td></tr><tr><td>sensor-enable</td><td>-</td><td>bool</td><td><p>This variable is used to enable or disable</p><p>the battery temperature sensor, 0 is</p><p>disabled, 1 is enabled</p></td><td>0</td><td>RW</td><td>12</td></tr><tr><td>c-batt</td><td>C</td><td>float</td><td><p>The temperature of the external battery</p><p>temperature sensor</p></td><td>0</td><td>RO</td><td>13</td></tr><tr><td>c-afe</td><td>C</td><td>float</td><td>The temperature of the analog front end</td><td>0</td><td>RO</td><td>14</td></tr><tr><td>c-t</td><td>C</td><td>float</td><td>The temperature of the transistor (switch)</td><td>0</td><td>RO</td><td>15</td></tr><tr><td>c-r</td><td>C</td><td>float</td><td>The temperature of the sense resistor</td><td>0</td><td>RO</td><td>16</td></tr></tbody></table>

&#x20;

&#x20;

### The calculated battery variables list

Table 2.       Calculated battery variables list

<table data-header-hidden><thead><tr><th width="126"></th><th width="67"></th><th width="106"></th><th width="258"></th><th width="90"></th><th width="66"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Unit</td><td>Datatype</td><td>Description</td><td>Default</td><td>RO/RW</td><td>No</td></tr><tr><td>p-avg</td><td>W</td><td>float</td><td><p>Average power consumption over the</p><p>last 10 seconds.</p></td><td>0</td><td>RO</td><td>17</td></tr><tr><td>e-used</td><td>Wh</td><td>float</td><td>Power consumption since device boot</td><td>0</td><td>RO</td><td>18</td></tr><tr><td>t-full</td><td>h</td><td>float</td><td><p>Charging is expected to complete in this</p><p>time; zero if not charging.</p></td><td>0</td><td>RO</td><td>19</td></tr><tr><td>a-rem</td><td>Ah</td><td>float</td><td>Remaining capacity in the battery</td><td>0</td><td>RW</td><td>20</td></tr><tr><td>a-full</td><td>Ah</td><td>float</td><td><p>Full charge capacity, predicted battery</p><p>capacity when it is fully charged.</p><p>Decreases with aging.</p></td><td>4.6</td><td>RW</td><td>21</td></tr><tr><td>a-factory</td><td>Ah</td><td>float</td><td>Battery capacity stated by the factory</td><td>4.6</td><td>RW</td><td>22</td></tr><tr><td>s-charge</td><td>%</td><td>uint8_t</td><td>Percentage of the full charge 0 - 100%.</td><td>0</td><td>RO</td><td>23</td></tr><tr><td>s-health</td><td>%</td><td>uint8_t</td><td><p>Health of the battery in percentage, use</p><p>STATE_OF_HEALTH_UNKNOWN =</p><p>127 if cannot be estimated.</p></td><td>127</td><td>RO</td><td>24</td></tr><tr><td>s-out</td><td>-</td><td>bool</td><td>This is true if the output power is enabled.</td><td>0</td><td>RO</td><td>25</td></tr><tr><td>s-in-flight</td><td>-</td><td>bool</td><td><p>This is true if the system is in flight (with</p><p>flight-mode-enable and i-flight-mode)</p></td><td>0</td><td>RO</td><td>26</td></tr><tr><td>batt-id</td><td>-</td><td>uint8_t</td><td><p>Identifies the battery within this vehicle,</p><p>0 - primary battery.</p></td><td>0</td><td>RW</td><td>27</td></tr></tbody></table>

### The additional battery variables list <a href="#ref167459217" id="ref167459217"></a>

Table 3.       Additional battery variables list

<table data-header-hidden><thead><tr><th width="128"></th><th width="67"></th><th width="105"></th><th width="242"></th><th width="92"></th><th width="66"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Unit</td><td>Datatype</td><td>Description</td><td>Default</td><td>RO/RW</td><td>No</td></tr><tr><td>v-cell-ov</td><td>V</td><td>float</td><td>Battery maximum allowed voltage for one cell. exceeding this voltage, the BMS will go to fault mode</td><td>4.2</td><td>RW</td><td>28</td></tr><tr><td>v-cell-uv</td><td>V</td><td>float</td><td><p>Battery minimum allowed voltage for one cell.</p><p>Going below this voltage, the BMS will go to</p><p>fault mode followed by deepsleep after</p><p>t-fault-timeout</p></td><td>3</td><td>RW</td><td>29</td></tr><tr><td>v-cell-nominal</td><td>V</td><td>float</td><td>Battery nominal voltage for one cell. will be used for energy calculation.</td><td>3.7</td><td>RW</td><td>30</td></tr><tr><td>v-storage</td><td>V</td><td>float</td><td>The voltage what is specified as storage voltage for a cell</td><td>3.8</td><td>RW</td><td>31</td></tr><tr><td>v-cell-margin</td><td>mV</td><td>uint8_t</td><td>Cell voltage charge margin to decide or not to go through another topping charge cycle</td><td>50</td><td>RW</td><td>32</td></tr><tr><td>v-recharge-margin</td><td>mV</td><td>Uint16_t</td><td>Cell voltage charge complete margin to decide or not to do a battery re-charge, to keep the cell voltages at max this much difference with the cell-ov</td><td>200</td><td>RW</td><td>33</td></tr><tr><td>i-peak-max</td><td>A</td><td>float</td><td>Maximum peak current threshold to open the switch during normal operation, can't be overruled</td><td>200</td><td>RW</td><td>34</td></tr><tr><td>i-out-max</td><td>A</td><td>float</td><td>Maximum current threshold to open the switch during normal operation, if not overruled</td><td>60</td><td>RW</td><td>35</td></tr><tr><td>i-out-nominal</td><td>A</td><td>float</td><td>Nominal discharge current (informative only)</td><td>60</td><td>RW</td><td>36</td></tr><tr><td>i-flight-mode</td><td>A</td><td>uint8_t</td><td>Current threshold to not disable the power in flight mode</td><td>5</td><td>RW</td><td>37</td></tr><tr><td>i-sleep-oc</td><td>mA</td><td>uint8_t</td><td>Overcurrent threshold detection in sleep mode that will wake up the BMS and also the threshold to detect the battery is not in use</td><td>30</td><td>RW</td><td>38</td></tr><tr><td>i-system</td><td>mA</td><td>uint8_t</td><td><p>Current of the BMS board itself, this is</p><p>measured (as well) during charging, so</p><p>this needs to be subtracted</p></td><td>40</td><td>RW</td><td>39</td></tr><tr><td>i-charge-max</td><td>A</td><td>float</td><td><p>Maximum current threshold to open the</p><p>switch during charging</p></td><td>4.6</td><td>RW</td><td>40</td></tr><tr><td>i-charge-nominal</td><td>A</td><td>float</td><td><p>Nominal charge current (informative</p><p>only)</p></td><td>4.6</td><td>RW</td><td>41</td></tr><tr><td>i-charge-full</td><td>mA</td><td>uint16_t</td><td><p>Current threshold to detect end of charge</p><p>sequence</p></td><td>50</td><td>RW</td><td>42</td></tr><tr><td>c-cell-ot</td><td>C</td><td>float</td><td><p>Over temperature threshold for the cells.</p><p>Going over this threshold and the BMS</p><p>will go to FAULT mode</p></td><td>45</td><td>RW</td><td>43</td></tr><tr><td>c-cell-ut</td><td>C</td><td>float</td><td><p>Under temperature threshold for the cells.</p><p>Going under this threshold and the BMS will</p><p>go to FAULT mode</p></td><td>-20</td><td>RW</td><td>44</td></tr><tr><td>c-pcb-ot</td><td>C</td><td>float</td><td><p>PCB Ambient temperature over temperature</p><p>threshold</p></td><td>45</td><td>RW</td><td>45</td></tr><tr><td>c-pcb-ut</td><td>C</td><td>float</td><td><p>PCB Ambient temperature under Temperature</p><p>threshold</p></td><td>-20</td><td>RW</td><td>46</td></tr><tr><td>c-cell-ot-charge</td><td>C</td><td>float</td><td><p>Over temperature threshold for the cells</p><p>During charging. Going over this threshold and</p><p>the BMS will go to FAULT mode.</p><p> </p><p> </p></td><td>40</td><td>RW</td><td>47</td></tr><tr><td>c-cell-ut-charge</td><td>C</td><td>float</td><td><p>Under temperature threshold for the cells</p><p>during charging. Going under this</p><p>threshold during charging and the BMS</p><p>will go to FAULT mode</p></td><td>0</td><td>RW</td><td>48</td></tr><tr><td>n-charges</td><td>-</td><td>uint16_t</td><td>The number of charges done</td><td>0</td><td>RW</td><td>49</td></tr><tr><td>n-charges-full</td><td>-</td><td>uint16_t</td><td>The number of complete charges</td><td>0</td><td>RW</td><td>50</td></tr><tr><td>ocv-slope</td><td>mV/A.min</td><td>float</td><td><p>The slope of the OCV curve. This will</p><p>be used to calculate the balance time. </p></td><td>5.3</td><td>RW</td><td>51</td></tr><tr><td>battery-type</td><td>-</td><td>uint8_t</td><td><p>The type of battery attached to it.</p><p>0 = LiPo, 1 = LiFePO4, 2 = LiFeYPO4,</p><p>3 = NMC (LiPo type, LiNiMnCoO2),</p><p>4 = Na-ion (Sodium-ion, SIB). Could be</p><p>extended. Will change OV, UV, v-storage,</p><p>OCV/SoC table if changed runtime.</p></td><td>3</td><td>RW</td><td>52</td></tr></tbody></table>

### &#x20;The configuration variables list <a href="#ref167459195" id="ref167459195"></a>

Table 4.       Configuration variables list

&#x20;

<table data-header-hidden><thead><tr><th width="132"></th><th width="68"></th><th width="104"></th><th width="231"></th><th width="106"></th><th width="65"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Unit</td><td>Datatype</td><td>Description</td><td>Default</td><td>RO/RW</td><td>No</td></tr><tr><td>t-meas</td><td>ms</td><td>uint16_t</td><td>Cycle of the battery to perform a complete battery measurement and SOC estimation can only be 10000 or a whole division of 10000 (For example: 5000, 1000, 500)</td><td>1000</td><td>RW</td><td>53</td></tr><tr><td><del>t-ftti</del></td><td><del>ms</del></td><td><del>uint16_t</del></td><td><del>Cycle of the battery to perform diagnostics (Fault Tolerant Time Interval)</del></td><td><del>1000</del></td><td><del>RW</del></td><td><del>54</del></td></tr><tr><td>t-bms-timeout</td><td>s</td><td>uint16_t</td><td>Timeout for the BMS to go to SLEEP mode when the battery is not used.</td><td>600</td><td>RW</td><td>55</td></tr><tr><td>t-fault-timeout</td><td>s</td><td>uint16_t</td><td>After this timeout, with an undervoltage fault the battery will go to DEEPSLEEP mode to preserve power. 0 sec is disabled.</td><td>60</td><td>RW</td><td>56</td></tr><tr><td>t-bcc-sleep-cyclic</td><td>s</td><td>uint8_t</td><td>Wake up cyclic timing of the AFE (after front end) during sleep mode</td><td>1</td><td>RW</td><td>57</td></tr><tr><td>t-sleep-timeout</td><td>h</td><td>uint8_t</td><td>When the BMS is in sleep mode for this period it will go to the self-discharge mode, 0 if disabled.</td><td>24</td><td>RW</td><td>58</td></tr><tr><td>t-ocv-cyclic0</td><td>s</td><td>int32_t</td><td>OCV measurement cyclic timer start (timer is increase by 50% at each cycle)</td><td>300</td><td>RW</td><td>59</td></tr><tr><td>t-ocv-cyclic1</td><td>s</td><td>int32_t</td><td>OCV measurement cyclic timer final value (limit)</td><td>86400</td><td>RW</td><td>60</td></tr><tr><td>t-charge-detect</td><td>s</td><td>uint8_t</td><td>During NORMAL mode, if the battery current is positive for more than this time, then the BMS will go to CHARGE mode</td><td>1</td><td>RW</td><td>61</td></tr><tr><td>t-cb-delay</td><td>s</td><td>uint8_t</td><td>Time for the cell balancing function to start after entering the CHARGE mode</td><td>120</td><td>RW</td><td>62</td></tr><tr><td>t-charge-relax</td><td>s</td><td>uint16_t</td><td>Relaxation time after the charge is complete before going to another charge round.</td><td>300</td><td>RW</td><td>63</td></tr><tr><td>batt-eol</td><td>%</td><td>uint8_t</td><td>Percentage at which the battery is end-of-life and shouldn’t be used anymore Typically between 90%-50%</td><td>80</td><td>RW</td><td>64</td></tr><tr><td>s-flags</td><td>-</td><td>uint8_t</td><td><p>This contains the status flags as</p><p>described in BMS_status_flags_t</p></td><td>255</td><td>RO</td><td>65</td></tr><tr><td>self-discharge-enable</td><td>-</td><td>bool</td><td>This variable is used to enable or disable the SELF_DISCHARGE state, 0 is disabled, 1 is enabled</td><td>1</td><td>RW</td><td>66</td></tr><tr><td>flight-mode-enable</td><td>-</td><td>bool</td><td>This variable is used to enable or disable flight mode, is used together with i-flight-mode. 0 is disabled</td><td>0</td><td>RW</td><td>67</td></tr><tr><td>emergency-button-enable</td><td>-</td><td>bool</td><td>This variable is used to enable or disable the emergency button on PTE8.</td><td>0</td><td>RW</td><td>68</td></tr><tr><td>smbus-enable</td><td>-</td><td>bool</td><td>This variable is used to enable or disable the SMBus update.</td><td>0</td><td>RW</td><td>69</td></tr><tr><td>gate-check-enable</td><td>-</td><td>bool</td><td>This variable is used to enable or disable the gate safety check. If true, it will check if it can be turned off, based on output voltage.</td><td>1</td><td>RW</td><td>70</td></tr><tr><td>model-id</td><td>-</td><td>uint64_t</td><td>Model id, set to 0 if not applicable</td><td>0</td><td>RW</td><td>71</td></tr><tr><td>model-name</td><td>-</td><td>char[32]</td><td><p>Battery model name, model name is a</p><p>human-readable string that could</p><p>include the vendor, model, chemistry.</p></td><td>"BMS772"</td><td>RW</td><td>72</td></tr></tbody></table>

### The can variables list <a href="#ref167459188" id="ref167459188"></a>

Table 5.       Can variables list

<table data-header-hidden><thead><tr><th width="131"></th><th width="73"></th><th width="107"></th><th width="222"></th><th width="110"></th><th width="69"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Unit</td><td>Datatype</td><td>Description</td><td>Default</td><td>RO/RW</td><td>No</td></tr><tr><td>cyphal-node-static-id*</td><td>-</td><td>uint8_t</td><td>This is the node ID of the CYPHAL node. Should be between 1 - 127 or 255 for PNP.</td><td>255</td><td>RW</td><td>73</td></tr><tr><td>cyphal-es-sub-id*</td><td>-</td><td>uint16_t</td><td>This is the subject ID of the energy source CYPHAL message (1...100Hz)</td><td>4096</td><td>RW</td><td>74</td></tr><tr><td>cyphal-bs-sub-id*</td><td>-</td><td>uint16_t</td><td>This is the subject ID of the battery status CYPHAL message (1Hz)</td><td>4097</td><td>RW</td><td>75</td></tr><tr><td>cyphal-bp-sub-id*</td><td>-</td><td>uint16_t</td><td>This is the subject ID of the battery parameters CYPHAL message (0.2Hz)</td><td>4098</td><td>RW</td><td>76</td></tr><tr><td>cyphal-legacy-bi-sub-id*</td><td>-</td><td>uint16_t</td><td>This is the subject ID of the battery info legacy CYPHAL message (0.2 ~ 1Hz)</td><td>65535</td><td>RW</td><td>77</td></tr><tr><td>dronecan-node-static-id</td><td>-</td><td>uint8_t</td><td>This is the node ID of the DRONECAN node. Should be between 1 - 127 or 255 for dynamic node id.</td><td>0</td><td>RW</td><td>78</td></tr><tr><td>dronecan-bat-continuous</td><td>-</td><td>uint8_t</td><td>This indicates if the particular DroneCAN topic has to be published</td><td>0</td><td>RW</td><td>79</td></tr><tr><td>dronecan-bat-periodic</td><td>-</td><td>uint8_t</td><td>This indicates if the particular DroneCAN topic has to be published</td><td>0</td><td>RW</td><td>80</td></tr><tr><td>dronecan-bat-cells</td><td>-</td><td>uint8_t</td><td>This indicates if the particular DroneCAN topic has to be published</td><td>0</td><td>RW</td><td>81</td></tr><tr><td>dronecan-bat-info</td><td>-</td><td>uint8_t</td><td>This indicates if the particular DroneCAN topic has to be published</td><td>1</td><td>RW</td><td>82</td></tr><tr><td>dronecan-bat-info-aux</td><td>-</td><td>uint8_t</td><td>This indicates if the particular DroneCAN topic has to be published</td><td>1</td><td>RW</td><td>83</td></tr><tr><td>can-mode</td><td>-</td><td>char[32]</td><td>Options “OFF”, "DRONECAN" and "CYPHAL". To indicate which is used.</td><td>“OFF”</td><td>RW</td><td>84</td></tr><tr><td>can-fd-mode*</td><td>-</td><td>uint8_t</td><td>If true CANFD is used, otherwise classic CAN is used</td><td>0</td><td>RW</td><td>85</td></tr><tr><td>can-bitrate*</td><td>bit/s</td><td>int32_t</td><td>The bitrate of classical can or CAN FD arbitration bitrate</td><td>1000000</td><td>RW</td><td>86</td></tr><tr><td>can-fd-bitrate*</td><td>bit/s</td><td>int32_t</td><td>The bitrate of CAN FD data bitrate</td><td>4000000</td><td>RW</td><td>87</td></tr></tbody></table>

A ~~line~~ means this is not implemented yet.

\* These parameters will only be implemented during startup of the BMS

&#x20;

### The hardware parameters

Table 6.       BMS hardware parameters list

<table data-header-hidden><thead><tr><th width="128"></th><th width="69"></th><th width="103"></th><th width="261"></th><th width="89"></th><th width="65"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Unit</td><td>Datatype</td><td>Description</td><td>Default</td><td>RO/RW</td><td>No</td></tr><tr><td>v-min</td><td>V</td><td>uint8_t</td><td>Minimum stack voltage for the BMS board to be fully functional</td><td>6</td><td>RW</td><td>88</td></tr><tr><td>v-max</td><td>V</td><td>uint8_t</td><td>Maximum stack voltage allowed by the BMS board</td><td>26</td><td>RW</td><td>89</td></tr><tr><td>i-range-max</td><td>A</td><td>uint16_t</td><td>Maximum current that can be measured by the BMS board</td><td>300</td><td>RW</td><td>90</td></tr><tr><td>i-max</td><td>A</td><td>uint8_t</td><td>Maximum DC current allowed in the BMS board (limited by power dissipation in the MOSFETs). For info only. Use i-out-max for a limit.</td><td>60</td><td>RW</td><td>91</td></tr><tr><td>i-short</td><td>A</td><td>uint16_t</td><td>Short circuit current threshold (typical: 550A, min: 500A, max: 600A)</td><td>500</td><td>RW</td><td>92</td></tr><tr><td>t-short</td><td>us</td><td>uint8_t</td><td>Blanking time for the short circuit detection</td><td>20</td><td>RW</td><td>93</td></tr><tr><td>i-bal</td><td>mA</td><td>uint8_t</td><td>Cell balancing current under 4.2V with cell balancing resistors of 82 ohms</td><td>50</td><td>RW</td><td>94</td></tr><tr><td>m-mass</td><td>kg</td><td>float</td><td>The total mass of the (smart) battery</td><td>0</td><td>RW</td><td>95</td></tr><tr><td>f-v-out-divider-factor</td><td>-</td><td>float</td><td>The factor of the output voltage divider as component tolerances could be different to not result in 11.0.</td><td>11.0</td><td>RW</td><td>96</td></tr></tbody></table>

A ~~line~~ means this is not implemented yet.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nxp.gitbook.io/rddrone-bms772/software-guide-nuttx/untitled-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
