Revision f7d2c786
| Target/Modules/DiWheelDrive_1-1/Boot/iodef.h | ||
|---|---|---|
| 55 | 55 |
#define IR_SDA_PIN GPIO_Pin_11 |
| 56 | 56 |
#define IR_INT_GPIO GPIOB |
| 57 | 57 |
#define IR_INT_PIN GPIO_Pin_12 |
| 58 |
#define GYRP_DRDY_GPIO GPIOB
|
|
| 58 |
#define GYRO_DRDY_GPIO GPIOB
|
|
| 59 | 59 |
#define GYRO_DRDY_PIN GPIO_Pin_13 |
| 60 | 60 |
#define SYS_UART_UP_GPIO GPIOB |
| 61 | 61 |
#define SYS_UART_UP_PIN GPIO_Pin_14 |
| Target/Modules/DiWheelDrive_1-1/Boot/main.c | ||
|---|---|---|
| 78 | 78 |
|
| 79 | 79 |
const blCallbackTable_t cbtable __attribute__ ((section ("_callback_table"))) = {
|
| 80 | 80 |
.magicNumber = BL_MAGIC_NUMBER, |
| 81 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Release, BL_VERSION_MAJOR, BL_VERSION_MINOR, 2},
|
|
| 81 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Beta, BL_VERSION_MAJOR, BL_VERSION_MINOR, 0},
|
|
| 82 | 82 |
.vSSSP = {BL_VERSION_ID_SSSP, BL_SSSP_VERSION_MAJOR, BL_SSSP_VERSION_MINOR, 0},
|
| 83 | 83 |
.vCompiler = {BL_VERSION_ID_GCC, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__}, // currently only GCC is supported
|
| 84 | 84 |
.cbShutdownHibernate = blCallbackShutdownHibernate, |
| ... | ... | |
| 95 | 95 |
.cb11 = (void*)0 |
| 96 | 96 |
}; |
| 97 | 97 |
|
| 98 |
|
|
| 99 | 98 |
/************************************************************************************//** |
| 100 | 99 |
** \brief This is the entry point for the bootloader application and is called |
| 101 | 100 |
** by the reset interrupt vector after the C-startup routines executed. |
| ... | ... | |
| 174 | 173 |
status = handleColdReset(); |
| 175 | 174 |
} |
| 176 | 175 |
|
| 177 |
/* if something wehnt wrong, signal this failure */
|
|
| 176 |
/* if something went wrong, signal this failure */ |
|
| 178 | 177 |
if (status != SUCCESS) {
|
| 179 | 178 |
blinkSOSinf(); |
| 180 | 179 |
} |
| ... | ... | |
| 392 | 391 |
GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource15); // ACCEL_INT_N |
| 393 | 392 |
|
| 394 | 393 |
return; |
| 395 |
} |
|
| 394 |
} /*** end of initExti ***/
|
|
| 396 | 395 |
|
| 397 | 396 |
/* |
| 398 | 397 |
* Signals, which type of low-power mode the system shall enter after the shutdown sequence. |
| ... | ... | |
| 483 | 482 |
} /*** end of shutdownToTransportation ***/ |
| 484 | 483 |
|
| 485 | 484 |
/* |
| 486 |
* Final shutdown of the system to enter deepseleep mode.
|
|
| 485 |
* Final shutdown of the system to enter deepsleep mode. |
|
| 487 | 486 |
*/ |
| 488 | 487 |
void shutdownToDeepsleep(const blt_bool exec_disambiguation) {
|
| 489 | 488 |
/* configure some criticpal GPIOs as input |
| Target/Modules/LightRing_1-0/Boot/blt_conf.h | ||
|---|---|---|
| 116 | 116 |
/** \brief Configure legacy device ID. */ |
| 117 | 117 |
#define BOOT_COM_DEVICE_LEGACY_ID (0x3) |
| 118 | 118 |
|
| 119 |
|
|
| 120 | 119 |
/* The UART communication interface is selected by setting the BOOT_COM_UART_ENABLE |
| 121 | 120 |
* configurable to 1. Configurable BOOT_COM_UART_BAUDRATE selects the communication speed |
| 122 | 121 |
* in bits/second. The maximum amount of data bytes in a message for data transmission |
| Target/Modules/LightRing_1-0/Boot/main.c | ||
|---|---|---|
| 75 | 75 |
|
| 76 | 76 |
const blCallbackTable_t cbtable __attribute__ ((section ("_callback_table"))) = {
|
| 77 | 77 |
.magicNumber = BL_MAGIC_NUMBER, |
| 78 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Release, BL_VERSION_MAJOR, BL_VERSION_MINOR, 2},
|
|
| 78 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Beta, BL_VERSION_MAJOR, BL_VERSION_MINOR, 0},
|
|
| 79 | 79 |
.vSSSP = {BL_VERSION_ID_SSSP, BL_SSSP_VERSION_MAJOR, BL_SSSP_VERSION_MINOR, 0},
|
| 80 | 80 |
.vCompiler = {BL_VERSION_ID_GCC, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__}, // currently only GCC is supported
|
| 81 | 81 |
.cbShutdownHibernate = blCallbackShutdownHibernate, |
| ... | ... | |
| 103 | 103 |
/* initialize the microcontroller */ |
| 104 | 104 |
Init(); |
| 105 | 105 |
|
| 106 |
/* activate some required cocks */ |
|
| 106 |
/* activate some required clocks */
|
|
| 107 | 107 |
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); |
| 108 | 108 |
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD, ENABLE); |
| 109 | 109 |
|
| ... | ... | |
| 133 | 133 |
|
| 134 | 134 |
setLed(BLT_FALSE); |
| 135 | 135 |
|
| 136 |
/* hanlde different wakeup/reset reasons */
|
|
| 136 |
/* handle different wakeup/reset reasons */
|
|
| 137 | 137 |
ErrorStatus status = ERROR; |
| 138 | 138 |
if (backup_reg.wakeup_pri_reason & BL_WAKEUP_PRI_RSN_PINRST) {
|
| 139 | 139 |
/* system was woken via NRST pin */ |
| ... | ... | |
| 533 | 533 |
*/ |
| 534 | 534 |
|
| 535 | 535 |
return; |
| 536 |
} |
|
| 536 |
} /*** end of shutdownAndRestart***/
|
|
| 537 | 537 |
|
| 538 | 538 |
/* |
| 539 | 539 |
* Configures some GPIO pins as inputs for safety reasons. |
| Target/Modules/PowerManagement_1-1/Boot/main.c | ||
|---|---|---|
| 88 | 88 |
|
| 89 | 89 |
const blCallbackTable_t cbtable __attribute__ ((section ("_callback_table"))) = {
|
| 90 | 90 |
.magicNumber = BL_MAGIC_NUMBER, |
| 91 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Release, BL_VERSION_MAJOR, BL_VERSION_MINOR, 2},
|
|
| 91 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Beta, BL_VERSION_MAJOR, BL_VERSION_MINOR, 0},
|
|
| 92 | 92 |
.vSSSP = {BL_VERSION_ID_SSSP, BL_SSSP_VERSION_MAJOR, BL_SSSP_VERSION_MINOR, 0},
|
| 93 | 93 |
.vCompiler = {BL_VERSION_ID_GCC, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__}, // currently only GCC is supported
|
| 94 | 94 |
.cbShutdownHibernate = blCallbackShutdownHibernate, |
| Target/Modules/moduleids.mk | ||
|---|---|---|
| 28 | 28 |
DiWheelDrive_1-1_ID_HEX = 0x01000101 |
| 29 | 29 |
DiWheelDrive_1-1_ID_DEC = 16777473 |
| 30 | 30 |
|
| 31 |
# PowerManagement v1.1 (01:01:01:01)
|
|
| 32 |
PowerManagement_1-1_ID_HEX = 0x01010101
|
|
| 33 |
PowerManagement_1-1_ID_DEC = 16843009
|
|
| 31 |
# DiWheelDrive v1.2 (01:00:01:02)
|
|
| 32 |
DiWheelDrive_1-2_ID_HEX = 0x01000102
|
|
| 33 |
DiWheelDrive_1-2_ID_DEC = 16777474
|
|
| 34 | 34 |
|
| 35 | 35 |
# LightRing v1.0 (01:7F:01:00) |
| 36 | 36 |
LightRing_1-0_ID_HEX = 0x017F0100 |
| 37 | 37 |
LightRing_1-0_ID_DEC = 25100544 |
| 38 | 38 |
|
| 39 |
# LightRing v1.2 (01:7F:01:02) |
|
| 40 |
LightRing_1-0_ID_HEX = 0x017F0102 |
|
| 41 |
LightRing_1-0_ID_DEC = 25100546 |
|
| 42 |
|
|
| 43 |
# PowerManagement v1.1 (01:01:01:01) |
|
| 44 |
PowerManagement_1-1_ID_HEX = 0x01010101 |
|
| 45 |
PowerManagement_1-1_ID_DEC = 16843009 |
|
| 46 |
|
|
| 47 |
# PowerManagement v1.2 (01:01:01:02) |
|
| 48 |
PowerManagement_1-2_ID_HEX = 0x01010102 |
|
| 49 |
PowerManagement_1-2_ID_DEC = 16843010 |
|
| 50 |
|
|
| Target/Source/AMiRo/amiroblt.h | ||
|---|---|---|
| 50 | 50 |
/** |
| 51 | 51 |
* @brief The minor version number of the bootloader. |
| 52 | 52 |
*/ |
| 53 |
#define BL_VERSION_MINOR 1
|
|
| 53 |
#define BL_VERSION_MINOR 2
|
|
| 54 | 54 |
|
| 55 | 55 |
/** |
| 56 | 56 |
* @brief The major version number of the implemented SSSP (Startup & Shutdown Synchronization Protocol). |
| ... | ... | |
| 343 | 343 |
BL_WAKEUP_SEC_RSN_ACCEL = 0x20u, |
| 344 | 344 |
|
| 345 | 345 |
/** |
| 346 |
* @brief The WKUP pin was triggered by an interrupt from the IMU. |
|
| 347 |
*/ |
|
| 348 |
BL_WAKEUP_SEC_RSN_IMU = 0x20u, |
|
| 349 |
|
|
| 350 |
/** |
|
| 346 | 351 |
* @brief Reserved value that must not be used right now, but might become valid in a future version. |
| 347 | 352 |
*/ |
| 348 | 353 |
BL_WAKEUP_SEC_RSN_RSVD = 0xC0u, |
| Target/Source/ARMCM3_STM32/can.c | ||
|---|---|---|
| 525 | 525 |
(((blt_int32u)canData[1]) << 8) | \ |
| 526 | 526 |
(((blt_int32u)canData[0])); |
| 527 | 527 |
#if (BOOT_GATE_ENABLE > 0) |
| 528 |
#if defined(BOOT_COM_DEVICE_LEGACY_ID) |
|
| 528 | 529 |
if ((commandSend == BLT_TRUE && deviceID == 0) || |
| 529 |
(commandSend != BLT_TRUE && (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID) || deviceID == (blt_int32u)BOOT_COM_DEVICE_LEGACY_ID)) {
|
|
| 530 |
(commandSend != BLT_TRUE && (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID || deviceID == (blt_int32u)BOOT_COM_DEVICE_LEGACY_ID))) {
|
|
| 530 | 531 |
#else |
| 532 |
if ((commandSend == BLT_TRUE && deviceID == 0) || |
|
| 533 |
(commandSend != BLT_TRUE && (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID))) {
|
|
| 534 |
#endif |
|
| 535 |
#else |
|
| 536 |
#if defined(BOOT_COM_DEVICE_LEGACY_ID) |
|
| 531 | 537 |
if (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID || |
| 532 | 538 |
deviceID == (blt_int32u)BOOT_COM_DEVICE_LEGACY_ID) {
|
| 539 |
#else |
|
| 540 |
if (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID) {
|
|
| 541 |
#endif |
|
| 533 | 542 |
#endif |
| 534 | 543 |
/* store length of the packet */ |
| 535 | 544 |
toReceive = canData[4]; |
| Target/Source/ARMCM4_STM32/can.c | ||
|---|---|---|
| 601 | 601 |
(((blt_int32u)canData[1]) << 8) | \ |
| 602 | 602 |
(((blt_int32u)canData[0])); |
| 603 | 603 |
#if (BOOT_GATE_ENABLE > 0) |
| 604 |
#if defined(BOOT_COM_DEVICE_LEGACY_ID) |
|
| 604 | 605 |
if ((commandSend == BLT_TRUE && deviceID == 0) || |
| 605 |
(commandSend != BLT_TRUE && (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID) || deviceID == (blt_int32u)BOOT_COM_DEVICE_LEGACY_ID)) {
|
|
| 606 |
(commandSend != BLT_TRUE && (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID || deviceID == (blt_int32u)BOOT_COM_DEVICE_LEGACY_ID))) {
|
|
| 607 |
#else |
|
| 608 |
if ((commandSend == BLT_TRUE && deviceID == 0) || |
|
| 609 |
(commandSend != BLT_TRUE && (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID))) {
|
|
| 610 |
#endif |
|
| 606 | 611 |
#else |
| 607 | 612 |
if (deviceID == (blt_int32u)BOOT_COM_DEVICE_ID) {
|
| 608 | 613 |
#endif |
| Target/Source/xcp.c | ||
|---|---|---|
| 714 | 714 |
} |
| 715 | 715 |
/* indicate that the connection is established */ |
| 716 | 716 |
#if (BOOT_GATE_ENABLE > 0) |
| 717 |
#if defined(BOOT_COM_DEVICE_LEGACY_ID) |
|
| 717 | 718 |
if (deviceID == 0 || |
| 718 | 719 |
deviceID == (blt_int32u)BOOT_COM_DEVICE_ID || |
| 719 | 720 |
deviceID == (blt_int32u)BOOT_COM_DEVICE_LEGACY_ID) {
|
| 721 |
#else |
|
| 722 |
if (deviceID == 0 || |
|
| 723 |
deviceID == (blt_int32u)BOOT_COM_DEVICE_ID) {
|
|
| 724 |
#endif |
|
| 720 | 725 |
#endif |
| 721 | 726 |
xcpInfo.connected = 1; |
| 722 | 727 |
setLed(1); |
Also available in: Unified diff