foxBMS - Unit Tests  1.5.0
The foxBMS Unit Tests API Documentation
can_cbs_tx_debug-response.c
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2023, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file can_cbs_tx_debug-response.c
44  * @author foxBMS Team
45  * @date 2019-12-04 (date of creation)
46  * @updated 2023-02-03 (date of last update)
47  * @version v1.5.0
48  * @ingroup DRIVERS
49  * @prefix CANTX
50  *
51  * @brief Implementation for handling the transmit of debug response messages
52  * @details Implementation of the interface for transmitting debug response
53  * messages (#CANTX_DebugResponse).
54  * The interface only serves as a wrapper that calls internally the
55  * respective functions to transmit the debug data.
56  */
57 
58 /*========== Includes =======================================================*/
59 #include "general.h"
60 
62 
63 #include "version_cfg.h"
64 
65 #include "HL_het.h"
66 #include "HL_reg_system.h"
67 
68 #include "can.h"
70 #include "can_helper.h"
71 #include "database.h"
72 #include "foxmath.h"
73 #include "fstd_types.h"
74 #include "rtc.h"
75 
76 #include <stdbool.h>
77 #include <stdint.h>
78 
79 /*========== Macros and Definitions =========================================*/
80 
81 /** @{
82  * multiplexer setup for the debug message
83  */
84 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_START_BIT (0x7u)
85 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_LENGTH (8u)
86 /** @} */
87 
88 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_BMS_SOFTWARE_VERSION_INFO (0x00u)
89 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_MCU_UNIQUE_DIE_ID (0x01u)
90 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_MCU_LOT_NUMBER (0x02u)
91 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_MCU_WAFER_INFORMATION (0x03u)
92 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_RTC_TIME (0x04u)
93 #define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_BOOT_INFORMATION (0x0Fu)
94 
95 /** @{
96  * configuration of the BMS software version information signals for
97  * multiplexer 'BmsSoftwareVersionInfo' in the 'DebugResponse' message
98  */
99 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MAJOR_VERSION_START_BIT (15u)
100 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MAJOR_VERSION_LENGTH (8u)
101 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MINOR_VERSION_START_BIT (23u)
102 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MINOR_VERSION_LENGTH (8u)
103 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_PATCH_VERSION_START_BIT (31u)
104 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_PATCH_VERSION_LENGTH (8u)
105 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_START_BIT (39u)
106 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_LENGTH (5u)
107 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_OVERFLOW_START_BIT (34u)
108 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_OVERFLOW_LENGTH (1u)
109 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_DIRTY_FLAG_START_BIT (33u)
110 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_DIRTY_FLAG_LENGTH (1u)
111 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_UNDER_VERSION_CONTROL_START_BIT (32u)
112 #define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_UNDER_VERSION_CONTROL_LENGTH (1u)
113 /** @} */
114 
115 /** @{
116  * configuration of the RTC signals for multiplexer 'RtcTime' in the
117  * 'DebugResponse' message
118  */
119 #define CANTX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_START_BIT (15u)
120 #define CANTX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_LENGTH (7u)
121 #define CANTX_MUX_RTC_SIGNAL_SECONDS_START_BIT (8u)
122 #define CANTX_MUX_RTC_SIGNAL_SECONDS_LENGTH (6u)
123 #define CANTX_MUX_RTC_SIGNAL_MINUTES_START_BIT (18u)
124 #define CANTX_MUX_RTC_SIGNAL_MINUTES_LENGTH (6u)
125 #define CANTX_MUX_RTC_SIGNAL_HOURS_START_BIT (28u)
126 #define CANTX_MUX_RTC_SIGNAL_HOURS_LENGTH (5u)
127 #define CANTX_MUX_RTC_SIGNAL_WEEKDAY_START_BIT (39u)
128 #define CANTX_MUX_RTC_SIGNAL_WEEKDAY_LENGTH (3u)
129 #define CANTX_MUX_RTC_SIGNAL_DAY_START_BIT (36u)
130 #define CANTX_MUX_RTC_SIGNAL_DAY_LENGTH (5u)
131 #define CANTX_MUX_RTC_SIGNAL_MONTH_START_BIT (47u)
132 #define CANTX_MUX_RTC_SIGNAL_MONTH_LENGTH (4u)
133 #define CANTX_MUX_RTC_SIGNAL_YEAR_START_BIT (43u)
134 #define CANTX_MUX_RTC_SIGNAL_YEAR_LENGTH (7u)
135 /** @} */
136 
137 /** maximum distance from release that can be encoded in the boot message */
138 #define CANTX_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE (31u)
139 #if CANTX_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE > UINT8_MAX
140 #error "This code assumes that the define is smaller or equal to UINT8_MAX")
141 #endif
142 
143 /** @{
144  * configuration of the lot message signals for multiplexer 'McuLotNumber'
145  * in the 'DebugResponse' message
146  */
147 #define CANTX_MUX_MCU_UNIQUE_DIE_ID_SIGNAL_UNIQUE_DIE_ID_START_BIT (15u)
148 #define CANTX_MUX_MCU_UNIQUE_DIE_ID_SIGNAL_UNIQUE_DIE_ID_LENGTH (32u)
149 /** @} */
150 
151 /** @{
152  * configuration of the lot message signals for multiplexer 'McuLotNumber'
153  * in the 'DebugResponse' message
154  */
155 #define CANTX_MUX_MCU_LOT_NUMBER_SIGNAL_LOT_NUMBER_START_BIT (15u)
156 #define CANTX_MUX_MCU_LOT_NUMBER_SIGNAL_LOT_NUMBER_LENGTH (32u)
157 /** @} */
158 
159 /** @{
160  * configuration of the wafer information message signals for multiplexer
161  * 'McuWaferInformation' in the 'DebugResponse' message
162  */
163 #define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_WAFER_NUMBER_START_BIT (15u)
164 #define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_WAFER_NUMBER_LENGTH (8u)
165 #define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_X_WAFER_COORDINATE_START_BIT (27u)
166 #define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_X_WAFER_COORDINATE_LENGTH (12u)
167 #define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_Y_WAFER_COORDINATE_START_BIT (23u)
168 #define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_Y_WAFER_COORDINATE_LENGTH (12u)
169 /** @} */
170 
171 /** @{
172  * configuration of the boot message signals for multiplexer 'BootInformation'
173  * in the 'DebugResponse' message
174  */
175 #define CANTX_MUX_BOOT_SIGNAL_START_BIT (15u)
176 #define CANTX_MUX_BOOT_SIGNAL_LENGTH (56u)
177 /** @} */
178 
179 /** @{
180  * Magic data, i.e., bit muster, in the boot message
181  */
182 #define CANTX_BOOT_MAGIC_DATA_START (0b11111110111111101111111011111110111111101111111011111110uLL)
183 #define CANTX_BOOT_MAGIC_DATA_END (0b00000001000000010000000100000001000000010000000100000001uLL)
184 /** @} */
185 
186 /** @{
187  * Register mapping of 'DIEIDL' (see #CANTX_TransmitMcuWaferInformation)
188  * x-coordinate: bits 0-11 -> 0b_0000_00000_0000_0000_0000_1111_1111_1111 = 0x_0000_0FFF
189  * y-coordinate: bits 12-23 -> 0b_0000_00000_1111_1111_1111_0000_0000_0000 = 0x_00FF_F000
190  * wafer number: bits 24-32 -> 0b_1111_11111_0000_0000_0000_0000_0000_0000 = 0x_FF00_0000
191  *
192  * source : SPNU563A-March 2018: Table 2-47. Die Identification Register, Lower Word (DIEIDL) Field Descriptions
193  * */
194 #define CANTX_WAFER_X_COORDINATE_BITMASK (0x00000FFFuLL)
195 #define CANTX_WAFER_Y_COORDINATE_BITMASK (0x00FFF000uLL)
196 #define CANTX_WAFER_Y_COORDINATE_SHIFT_12_BITS (12uLL)
197 #define CANTX_WAFER_NUMBER_BITMASK (0xFF000000uLL)
198 #define CANTX_WAFER_NUMBER_SHIFT_24_BITS (24uLL)
199 /** @} */
200 
201 /*========== Static Constant and Variable Definitions =======================*/
202 
203 /*========== Extern Constant and Variable Definitions =======================*/
204 
205 /*========== Static Function Prototypes =====================================*/
206 /**
207  * @brief Transmit the embedded software version information
208  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
209  */
211 
212 /**
213  * @brief Transmit the MCU's unique id
214  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
215  */
217 
218 /**
219  * @brief Transmit the MCU's lot number ID information
220  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
221  */
223 
224 /**
225  * @brief Transmit the MCU's wafer information
226  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
227  */
229 
230 /**
231  * @brief Transmit a boot message
232  * @param messageData message data to be put in the boot message
233  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
234  */
235 static STD_RETURN_TYPE_e CANTX_TransmitBootMagic(uint64_t messageData);
236 /**
237  * @brief Transmit the boot message and its magic start data
238  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
239  */
241 
242 /**
243  * @brief Transmit the boot message and its magic end data
244  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
245  */
247 
248 /**
249  * @brief Transmit the RTC time message
250  * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK
251  */
253 
254 /*========== Static Function Implementations ================================*/
255 
257  uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))};
258 
259  /* Set release distance (capped to maximum value) */
260  const uint8_t distanceCapped = (uint8_t)MATH_MinimumOfTwoUint16_t(
262  uint8_t releaseDistanceOverflow = 0;
264  releaseDistanceOverflow = 1;
265  }
266  uint64_t isDirty = 0;
268  isDirty = 1;
269  }
270  uint64_t underVersionControl = 0;
272  underVersionControl = 1;
273  }
274 
275  uint64_t message = 0;
277  &message,
283  &message,
289  &message,
295  &message,
301  &message,
304  distanceCapped,
307  &message,
310  releaseDistanceOverflow,
313  &message,
316  isDirty,
319  &message,
322  underVersionControl,
325  STD_RETURN_TYPE_e successfullyQueued =
327 
328  return successfullyQueued;
329 }
330 
332  uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))};
333 
334  /* Read out device register with unique ID */
335  const uint32_t deviceRegister = systemREG1->DEVID;
336 
337  uint64_t message = 0;
339  &message,
345  &message,
348  deviceRegister,
351 
352  STD_RETURN_TYPE_e successfullyQueued =
354  return successfullyQueued;
355 }
356 
358  uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))};
359 
360  /* Read out device register with die ID high */
361  const uint32_t dieIdHigh = systemREG1->DIEIDH; /* equals the lot number */
362 
363  uint64_t message = 0;
365  &message,
371  &message,
374  dieIdHigh,
377 
378  STD_RETURN_TYPE_e successfullyQueued =
380  return successfullyQueued;
381 }
382 
384  uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))};
385 
386  /* Read out device register with die ID low */
387  /* SPNU563A-March 2018: 2.5.1.28 Die Identification Register Lower Word (DIEIDL) */
388  const uint64_t dieIdLow = (uint64_t)systemREG1->DIEIDL;
389 
390  /* see doxygen comment of the macros */
391  uint64_t xWaferCoordinate = dieIdLow & CANTX_WAFER_X_COORDINATE_BITMASK;
392  uint64_t yWaferCoordinate = (dieIdLow & CANTX_WAFER_Y_COORDINATE_BITMASK) >> CANTX_WAFER_Y_COORDINATE_SHIFT_12_BITS;
393  uint64_t waferNumber = (dieIdLow & CANTX_WAFER_NUMBER_BITMASK) >> CANTX_WAFER_NUMBER_SHIFT_24_BITS;
394 
395  uint64_t message = 0;
397  &message,
403  &message,
406  waferNumber,
409  &message,
412  xWaferCoordinate,
415  &message,
418  yWaferCoordinate,
421  STD_RETURN_TYPE_e successfullyQueued =
423 
424  return successfullyQueued;
425 }
426 
427 static STD_RETURN_TYPE_e CANTX_TransmitBootMagic(uint64_t messageData) {
428  FAS_ASSERT((messageData == CANTX_BOOT_MAGIC_DATA_START) || (messageData == CANTX_BOOT_MAGIC_DATA_END));
429  uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))};
430 
431  uint64_t message = 0;
433  &message,
441  STD_RETURN_TYPE_e successfullyQueued =
443  return successfullyQueued;
444 }
445 
448 }
449 
452 }
453 
455  uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))};
456 
457  RTC_TIME_DATA_s currentRtcTime = RTC_GetSystemTimeRtcFormat();
458 
459  uint64_t message = 0;
461  &message,
467  &message,
470  currentRtcTime.hundredthOfSeconds,
473  &message,
476  currentRtcTime.seconds,
479  &message,
482  currentRtcTime.minutes,
485  &message,
488  currentRtcTime.hours,
491  &message,
494  currentRtcTime.weekday,
497  &message,
500  currentRtcTime.day,
503  &message,
506  currentRtcTime.month,
509  &message,
512  currentRtcTime.year,
514 
516  STD_RETURN_TYPE_e successfullyQueued =
518  return successfullyQueued;
519 }
520 
521 /*========== Extern Function Implementations ================================*/
523  STD_RETURN_TYPE_e successfullyQueued = STD_NOT_OK;
524  switch (action) {
526  successfullyQueued = CANTX_TransmitBmsVersionInfo();
527  break;
529  successfullyQueued = CANTX_TransmitMcuUniqueDieId();
530  break;
532  successfullyQueued = CANTX_TransmitMcuLotNumber();
533  break;
535  successfullyQueued = CANTX_TransmitMcuWaferInformation();
536  break;
538  successfullyQueued = CANTX_TransmitBootMagicStart();
539  break;
541  successfullyQueued = CANTX_TransmitBootMagicEnd();
542  break;
544  successfullyQueued = CANTX_TransmitRtcTime();
545  break;
546  default:
548  break; /* LCOV_EXCL_LINE */
549  }
550  return successfullyQueued;
551 }
552 /*========== Getter for static Variables (Unit Test) ========================*/
553 
554 /*========== Externalized Static Function Implementations (Unit Test) =======*/
STD_RETURN_TYPE_e CAN_DataSend(CAN_NODE_s *pNode, uint32_t id, CAN_IDENTIFIER_TYPE_e idType, uint8 *pData)
Sends over CAN the data passed in parameters. This function goes over the message boxes and marks the...
Definition: can.c:781
Header for the driver for the CAN module.
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_PATCH_VERSION_LENGTH
#define CANTX_MUX_RTC_SIGNAL_SECONDS_START_BIT
#define CANTX_MUX_RTC_SIGNAL_WEEKDAY_LENGTH
#define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_Y_WAFER_COORDINATE_START_BIT
#define CANTX_MUX_MCU_LOT_NUMBER_SIGNAL_LOT_NUMBER_LENGTH
#define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_WAFER_NUMBER_START_BIT
#define CANTX_MUX_MCU_UNIQUE_DIE_ID_SIGNAL_UNIQUE_DIE_ID_START_BIT
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_BOOT_INFORMATION
#define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_X_WAFER_COORDINATE_LENGTH
#define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_Y_WAFER_COORDINATE_LENGTH
static STD_RETURN_TYPE_e CANTX_TransmitMcuUniqueDieId(void)
Transmit the MCU's unique id.
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_PATCH_VERSION_START_BIT
#define CANTX_MUX_BOOT_SIGNAL_START_BIT
#define CANTX_MUX_RTC_SIGNAL_HOURS_START_BIT
STD_RETURN_TYPE_e CANTX_DebugResponse(CANTX_DEBUG_RESPONSE_ACTIONS_e action)
Handles Debug response message.
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_MCU_WAFER_INFORMATION
static STD_RETURN_TYPE_e CANTX_TransmitRtcTime(void)
Transmit the RTC time message.
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_OVERFLOW_START_BIT
#define CANTX_MUX_RTC_SIGNAL_MONTH_START_BIT
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_RTC_TIME
#define CANTX_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE
#define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_WAFER_NUMBER_LENGTH
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_LENGTH
#define CANTX_WAFER_NUMBER_BITMASK
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_MCU_UNIQUE_DIE_ID
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_LENGTH
static STD_RETURN_TYPE_e CANTX_TransmitBootMagic(uint64_t messageData)
Transmit a boot message.
#define CANTX_MUX_RTC_SIGNAL_YEAR_LENGTH
#define CANTX_MUX_RTC_SIGNAL_DAY_LENGTH
#define CANTX_MUX_RTC_SIGNAL_MONTH_LENGTH
#define CANTX_MUX_RTC_SIGNAL_DAY_START_BIT
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MAJOR_VERSION_START_BIT
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_OVERFLOW_LENGTH
#define CANTX_WAFER_X_COORDINATE_BITMASK
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_BMS_SOFTWARE_VERSION_INFO
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_UNDER_VERSION_CONTROL_START_BIT
static STD_RETURN_TYPE_e CANTX_TransmitBootMagicEnd(void)
Transmit the boot message and its magic end data.
#define CANTX_MUX_MCU_WAFER_INFORMATION_SIGNAL_X_WAFER_COORDINATE_START_BIT
#define CANTX_MUX_BOOT_SIGNAL_LENGTH
#define CANTX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_LENGTH
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_RELEASE_DISTANCE_START_BIT
static STD_RETURN_TYPE_e CANTX_TransmitMcuWaferInformation(void)
Transmit the MCU's wafer information.
#define CANTX_WAFER_NUMBER_SHIFT_24_BITS
#define CANTX_MUX_MCU_LOT_NUMBER_SIGNAL_LOT_NUMBER_START_BIT
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_VALUE_MCU_LOT_NUMBER
#define CANTX_BOOT_MAGIC_DATA_START
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MAJOR_VERSION_LENGTH
#define CANTX_MUX_RTC_SIGNAL_SECONDS_LENGTH
#define CANTX_MUX_RTC_SIGNAL_MINUTES_START_BIT
#define CANTX_WAFER_Y_COORDINATE_BITMASK
#define CANTX_WAFER_Y_COORDINATE_SHIFT_12_BITS
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_DIRTY_FLAG_LENGTH
#define CANTX_MUX_MCU_UNIQUE_DIE_ID_SIGNAL_UNIQUE_DIE_ID_LENGTH
static STD_RETURN_TYPE_e CANTX_TransmitBootMagicStart(void)
Transmit the boot message and its magic start data.
#define CANTX_MUX_RTC_SIGNAL_YEAR_START_BIT
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_DIRTY_FLAG_START_BIT
static STD_RETURN_TYPE_e CANTX_TransmitBmsVersionInfo(void)
Transmit the embedded software version information.
static STD_RETURN_TYPE_e CANTX_TransmitMcuLotNumber(void)
Transmit the MCU's lot number ID information.
#define CANTX_MUX_RTC_SIGNAL_HOURS_LENGTH
#define CANTX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_START_BIT
#define CANTX_DEBUG_RESPONSE_MESSAGE_MUX_START_BIT
#define CANTX_BOOT_MAGIC_DATA_END
#define CANTX_MUX_RTC_SIGNAL_MINUTES_LENGTH
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MINOR_VERSION_LENGTH
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_MINOR_VERSION_START_BIT
#define CANTX_MUX_RTC_SIGNAL_WEEKDAY_START_BIT
#define CANTX_MUX_BMS_SOFTWARE_VERSION_INFO_SIGNAL_UNDER_VERSION_CONTROL_LENGTH
Declarations for handling the transmit of debug response messages.
CANTX_DEBUG_RESPONSE_ACTIONS_e
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_LOT_NUMBER
@ CANTX_DEBUG_RESPONSE_TRANSMIT_BOOT_MAGIC_START
@ CANTX_DEBUG_RESPONSE_TRANSMIT_BOOT_MAGIC_END
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_UNIQUE_DIE_ID
@ CANTX_DEBUG_RESPONSE_TRANSMIT_RTC_TIME
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_WAFER_INFORMATION
@ CANTX_DEBUG_RESPONSE_TRANSMIT_BMS_VERSION_INFO
@ CAN_BIG_ENDIAN
Definition: can_cfg.h:158
#define CAN_NODE_DEBUG_MESSAGE
Definition: can_cfg.h:83
#define CAN_MAX_DLC
Definition: can_cfg.h:101
Header for the driver for the CAN module.
#define CANTX_DEBUG_RESPONSE_ID
#define CANTX_DEBUG_IDENTIFIER
void CAN_TxSetMessageDataWithSignalData(uint64_t *pMessage, uint64_t bitStart, uint8_t bitLength, uint64_t canSignal, CAN_ENDIANNESS_e endianness)
Puts CAN signal data in a 64-bit variable. This function is used to compose a 64-bit CAN message....
Definition: can_helper.c:173
void CAN_TxSetCanDataWithMessageData(uint64_t message, uint8_t *pCanData, CAN_ENDIANNESS_e endianness)
Copy CAN data from a 64-bit variable to 8 bytes. This function is used to copy a 64-bit CAN message t...
Definition: can_helper.c:212
Headers for the helper functions for the CAN module.
Database module header.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
Definition: fassert.h:250
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
Definition: fassert.h:129
uint16_t MATH_MinimumOfTwoUint16_t(const uint16_t value1, const uint16_t value2)
Returns the minimum of the passed uint16_t values.
Definition: foxmath.c:144
math library for often used math functions
Definition of foxBMS standard types.
STD_RETURN_TYPE_e
Definition: fstd_types.h:82
@ STD_NOT_OK
Definition: fstd_types.h:84
General macros and definitions for the whole platform.
#define GEN_REPEAT_U(x, n)
Macro that helps to generate a series of literals (for array initializers).
Definition: general.h:250
#define GEN_STRIP(x)
Definition: general.h:261
RTC_TIME_DATA_s RTC_GetSystemTimeRtcFormat(void)
get the RTC system timer.
Definition: rtc.c:607
Header file of the RTC driver.
uint8_t hours
Definition: rtc.h:77
uint8_t minutes
Definition: rtc.h:76
uint8_t seconds
Definition: rtc.h:75
uint8_t month
Definition: rtc.h:80
uint8_t weekday
Definition: rtc.h:78
uint8_t hundredthOfSeconds
Definition: rtc.h:74
uint8_t year
Definition: rtc.h:81
uint8_t day
Definition: rtc.h:79
const bool isDirty
Definition: version_cfg.h:82
const uint8_t major
Definition: version_cfg.h:83
const bool underVersionControl
Definition: version_cfg.h:81
const uint8_t minor
Definition: version_cfg.h:84
const uint8_t patch
Definition: version_cfg.h:85
const uint16_t distanceFromLastRelease
Definition: version_cfg.h:86
Header file for the version information that is generated by the toolchain.
const VER_VERSION_s ver_foxbmsVersionInformation